[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[no subject]
- From: Markus Müller <markus mueller gersys de>
- To: "GTK App Devel List" <gtk-app-devel-list gnome org>
- Cc: Stefan Strobl <stefan strobl gersys de>
- Subject:
- Date: Tue, 12 Feb 2008 12:31:39 +0100
Hello list,
let me just give a short introduction to myself before i get to the point...
I´m with Gersys, a small company producing embedded platforms for railway applications ( you may look at www.gersys.de).
In generel our products are small embedded pc´s running winXPe or linux in very rough environments. Normally our customers get a device running the OS and are writing their own applications.
I´m an developer of Hard- and Software and an electrical engineer. My background regarding software development for now is in first instance uC-Code in C, but i´ve also done some example applications under Windows/.NET/VisualStudio/C# for some graphical UI´s...
For our new project we have for the first time the task of programming a application:
Our customer installs several networking cameras along some city-trains. Our device has to get up to four video streams an display them (which is not the problem for now, maybe later ;-) )
The train driver has to be given the possibility of choosing which camera(s) he wants to view. Therefore, and now we get to the point, we have to display a symbolical image of the train which represents the number and position of the cameras and realize a navigation by key inputs through them. The predefined picture shows for example a train with three combined vehicles, each consisting of four/six waggons. The waggons have up to four inner cameras and up to two outer cameras, which are reprepesented by some pie-slice-like symbols (gdk_draw_arc()...). The selected camera(s) are highlighted by some color. An event from a navigation key moves the selection to the next set. The composition of the train may vary and has to be loaded at program start, so the displayed selection image has to be created dynamically.
Our developing platform is a Suse10.3-machine with Eclipse-Environment. The project is written in C and we use GTK2. Because of the above mentioned structure we have a very object-orientated approach, but due to compatibility/porting-issues we don´t want(ed) to use gtkmm (perhaps to be discused) for now. (The destination target is running eLinOS/Codeo-Environment/X-Server...)
I´ve "played" a lot the last week and got some few satisfying results: The drawing of the train using standard widgets and gdk-functions has already the lookalike of the predefined image. Creating a simple widget for drawing a camera symbol and manipulating the color of it was also succesful.
The main question for now i´d like to hear your opinion to is about the data structure of the project. My approach in cause of the resent results is following:
Creating low level widgets (e.g. the camera symbol, a waggon...) with the necessary data variables (e.g. color, name...), which can be manipulated by the "top level program part" (the one which knows what is selected etc. ...)
The widgets will be nested: The train-widget provides a array of vehicles which provides a array of waggons with an array of cameras...
Accessing the object properties can be done with references/pointers to the data variables (the "normal" access to struct-members e.g.: train.vehicle[1].waggon[4].camera[3].colour = green)
One of the biggest questions therefore is the structure of the necessary manipulating functions: How can i best handle e.g. the redrawing of a camera when its de-/selected (In C++ i would create a member-function to the camera-object!?). I think to create a function set for every widget which can always provide the interface for the upper "parent" instance!? Alternative there could be a set of "top level" functions, but therefore the parameters are getting kind of nasty !?
I hope i delivered enough information in this vast of text to provide an overview to my problem(s) and hope i get some opinions to my approaches from you to start a productive discussion about it!
Best regards
Markus
-----
Gersys GmbH, Hans-Urmiller-Ring 46c, D-82515 Wolfratshausen, Germany
Geschaeftsfuehrer: Erwin Sterzer, HRB 137 872 Muenchen, Fon: +49(0)8171 9986-6
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]