|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiGtkWidget.h>
Inheritance diagram for lti::mainGTKWindow:


Tools and information flags | |
| void | setStatusBar (const char *str) |
| int | mouseButtonPressed |
| point | lastMousePos |
GTK+ Widgets | |
| guint32 | rgbToInt (const int &r, const int &g, const int &b) const |
| GtkWidget * | window |
| GtkWidget * | scrolledWindow |
| GtkWidget * | statusBar |
| guint | statusBarContextId |
| GtkWidget * | darea |
| GtkWidget * | eventBox |
GTK+ callback functions | |
| void | createWindowLocal () |
| void | mouseMovedEventLocal (GtkWidget *widget, GdkEventMotion *event) |
| virtual void | buttonPressedEventLocal (GtkWidget *widget, GdkEventButton *event) |
| virtual void | keyPressedEventLocal (GtkWidget *widget, GdkEventKey *event) |
| virtual void | keyReleasedEventLocal (GtkWidget *widget, GdkEventKey *event) |
| virtual gboolean | dareaExposeLocal (GtkWidget *widget, GdkEventExpose *event) |
| static gint | delete_event (GtkWidget *widget, GdkEvent *event, gpointer data) |
| static gint | destroyWndTimeout (gpointer data) |
| static void | destroy (GtkWidget *widget, gpointer data) |
| static gint | show (gpointer data) |
| static gint | hide (gpointer data) |
| static gint | createWindowTimeout (gpointer data) |
| static gint | mouseMovedEvent (GtkWidget *widget, GdkEventMotion *event, gpointer data) |
| static gint | geometryChanged (GtkWidget *widget, GdkEventConfigure *event, gpointer data) |
| static gint | buttonPressedEvent (GtkWidget *widget, GdkEventButton *event, gpointer data) |
| static gint | keyPressedEvent (GtkWidget *widget, GdkEventKey *event, gpointer data) |
| static gint | keyReleasedEvent (GtkWidget *widget, GdkEventKey *event, gpointer data) |
| static gboolean | dareaExpose (GtkWidget *widget, GdkEventExpose *event, gpointer data) |
Public Member Functions | |
| mainGTKWindow (bool setConfigDlg=true) | |
| mainGTKWindow (const mainGTKWindow &other) | |
| virtual | ~mainGTKWindow () |
| void | init (void) |
| virtual bool | useParameters (viewerBase::parameters &par) |
| virtual void | changeGeometryRequest (const bool request=true) |
| virtual bool | redraw () |
| virtual bool | drawData () |
| virtual void | hideData () |
| void | createWindow () |
| void | setPosition (const point &p, const bool withinGtkThread) |
| point | getPosition () const |
| void | setSize (const point &p, const bool withinGtkThread) |
| point | getSize () const |
| void | destroyWindow () |
| const image & | getDisplayedData () const |
| mainGTKWindow & | copy (const mainGTKWindow &other) |
| virtual mainGTKWindow * | clone () const |
| void | lock () |
| void | unlock () |
Protected Member Functions | |
| void | generateXbuffer (const image &img, GtkWidget *widget, GdkEventExpose *event) |
| void | showXbuffer (GtkWidget *widget) |
| rgbPixel | intToRgb (const guint32 &rgb) const |
Members to be reimplemented | |
| virtual void | dataToImage (image &img) |
| virtual void | drawReady () |
| virtual void | prepareParameters () |
| virtual bool | validData () |
| virtual void | indicateDataHide () |
| virtual void | windowDestructionHandler () |
| virtual void | mouseMovedHandler (const int &button, const point &pos, const bool shift, const bool ctrl) |
| virtual void | mouseButtonHandler (const int &button, const point &pos, const bool shift, const bool ctrl, const bool pressed) |
| virtual void | keyPressedHandler (const bool shift, const bool ctrl, const int key) |
| virtual void | keyReleasedHandler (const bool shift, const bool ctrl, const int key) |
Protected Attributes | |
| viewerBase::parameters * | param |
| configGTKDialog * | options |
| image | theImage |
| bool | busy |
| mutex | theLock |
| semaphore | syncEnd |
| bool | dataChanged |
| guchar * | xbuffer |
| int | xbuffer_rows |
| int | xbuffer_cols |
| std::string | winName |
| point | winSize |
| point | winPosition |
| bool | geometryChangeRq |
| gint | timerTag |
Static Protected Attributes | |
| static const point | borderWidth |
|
|
default constructor
|
|
|
copy constructor
|
|
|
destructor
|
|
||||||||||||||||
|
function called when any mouse button has been pressed.
|
|
||||||||||||
|
called by buttonPressedEvent()
|
|
|
update geometry the next time
|
|
|
clone this window
Reimplemented in lti::viewer::mainWindow, lti::viewer::mainWndChannelFixed, lti::viewer::mainWndChannelFloat, lti::viewer::mainWndVector, and lti::viewer::mainWndImage. |
|
|
copy this window (only the actual data will be copied. The display queue will not be copied! |
|
|
creates new window
|
|
|
called by createWindow to create a window
|
|
|
creates new window timeout (this will be called when the time has come to create the window).
|
|
||||||||||||||||
|
gtk-callback funtion to redraw the image been displayed. This function just calls the dareaExposeLocal() |
|
||||||||||||
|
This function redraws the image been displayed.
|
|
|
This method is the one where your data should be drawn. You just need to draw on the "theImage" attribute image. Reimplemented in lti::viewer::mainWindow, lti::viewer::mainWndChannelFixed, lti::viewer::mainWndChannelFloat, lti::viewer::mainWndVector, and lti::viewer::mainWndImage. |
|
||||||||||||||||
|
called when the user selects the "close window" button on the window
|
|
||||||||||||
|
call-back funtion to indicate the end of the whole gtk-application. This function will end the gtk main-event-loop! |
|
|
destroy the window
|
|
|
timeout gtk-callback function, called when the window must be destroyed. This static function just call the instance member destroyWindow(). |
|
|
generate an event which will show the data
Reimplemented in lti::viewer::mainWindow. |
|
|
This method is called as soon as all data has been drawn. You can use it to send a message to another widget or object, in order to allow further actions. The default implementation does nothing. Reimplemented in lti::viewer::mainWindow. |
|
||||||||||||||||
|
generate xbuffer from an image
|
|
||||||||||||||||
|
callback function called when the window size or position are changed.
|
|
|
return a lti::image with the data being displayed. Used by the save image routines! |
|
|
get position of the window
|
|
|
get size of the window
|
|
|
timeout gtk-callback function, called when a new image must be hide!
|
|
|
generate an event which will hide the data
|
|
|
this method will be called to invalidate the data. Usually will set a few pointers to NULL to indicate that the window has been hidden, and no valid data is keeped in this class any more. Reimplemented in lti::viewer::mainWindow. |
|
|
initialize values for the constructor
|
|
|
unpack an gtk-integer into a rgb pixel
|
|
||||||||||||||||
|
function called when any key has been pressed.
|
|
||||||||||||
|
function called when any key has been pressed.
|
|
||||||||||||||||
|
this method is called when a key is pressed while the viewer window is active.
Reimplemented in lti::viewer::mainWindow. |
|
||||||||||||||||
|
function called when any key has been pressed.
|
|
||||||||||||
|
function called when any key has been pressed.
|
|
||||||||||||||||
|
this method is called when a key is released while the viewer window is active.
Reimplemented in lti::viewer::mainWindow. |
|
|
lock internal data
|
|
||||||||||||||||||||||||
|
this method is called when a mouse button is pressed.
Reimplemented in lti::viewer::mainWindow. |
|
||||||||||||||||
|
callback function called when the mouse is moved and a mouse button has been pressed. This function just calls the mouseMovedEventLocal() |
|
||||||||||||
|
method called by mouseMovedEvent() when the mouse has been moved. This will show on the status bar the mouse pointer position and the value of the image at this position. |
|
||||||||||||||||||||
|
this method is called when a mouse button is pressed and the mouse moved.
Reimplemented in lti::viewer::mainWindow. |
|
|
Prepare the parameters before the configuration dialog is started. This member gets some information of the displayed data into the informational attributes of the parameters instance. It is called just before opening the settings dialog, and is the proper place to update the mentioned informational data. Reimplemented in lti::viewer::mainWindow, lti::viewer::mainWndChannelFixed, lti::viewer::mainWndChannelFloat, lti::viewer::mainWndVector, and lti::viewer::mainWndImage. |
|
|
similar to drawData, but used by other widgets (like the configuration dialog) to force new image display
|
|
||||||||||||||||
|
convert the three color components red, green and blue in a guint32 used by the gtk-color maps.
|
|
||||||||||||
|
set position of the window
|
|
||||||||||||
|
set size of the window
|
|
|
write the given string into the status bar
|
|
|
timeout gtk-callback function, called when a new image must be displayed! This function will stop the timeout automatically, if there are no more images or objects to be displayed. |
|
|
generate xbuffer from an image
|
|
|
unlock internal data
|
|
|
set the display parameters
|
|
|
Indicate if there are valid data to show. This method must check if the provided data is ready to be shown, i.e. if the dataToImage() can be already be used to draw the data. Reimplemented in lti::viewer::mainWindow. |
|
|
window destruction handler. This method is called when the window is destroyed. You don't need to call GTK hide methods or stuff like that, because the enclosing application will take care on these matters. Just finalize tasks you started that should be active as long as the widget window does. A typical use for this method is un-locking keyboard or mouse mutexes that wait for the user. If he closes the window without giving any information, these mutexes will remain locked, blocking some other threads. This method is the proper place to un-lock them. Reimplemented in lti::viewer::mainWindow. |
|
|
extra width needed for the scrollbars
|
|
|
if the viewer is computing the image to be shown, this attribute is true
|
|
|
drawing area that holds the image
|
|
|
if the data has changed, this variable is true
|
|
|
event box to capture mouse and button events
|
|
|
geometry change request from user
|
|
|
last position of the mouse in the window.
|
|
|
mouse being pressed. This attribute will contain always the status of the mouse buttons. The values will usually be: Nothing : 0 Left button : 1 Middle button: 2 Right button : 3 Wheel Up : 4 Wheel Down : 5 |
|
|
the statistics and displaying options dialog
|
|
|
the viewer parameters. This is just a pointer to an external instance. This class will never delete or clone the pointed object |
|
|
the scrolled window
|
|
|
the status bar
|
|
|
context id of the status bar
|
|
|
semaphore used to synchronize destruction of the widgets
|
|
|
the data which is been actually displayed.
|
|
|
data lock. Used to protect the data against parallel access |
|
|
timer tag used in this viewer window
|
|
|
the main dialog window
|
|
|
name of this window!
|
|
|
position of the window
|
|
|
size of the window
|
|
|
buffer of image being displayed!
|
|
|
number of columns of the xbuffer
|
|
|
number of rows of the xbuffer
|