gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <SelectionArea.H>
Public Member Functions | |
SelectionArea () | |
Constructor. More... | |
SelectionArea (float boxWidth, float boxHeight) | |
virtual | ~SelectionArea () |
Destructor. More... | |
virtual void | reDrawBoxes (cairo_t *cr) |
CairoBox | getStaticBox (void) |
void | centerStaticBox (void) |
virtual bool | expose () |
void | setBoxWidths (int width) |
void | setBoxHeights (int height) |
void | setBoxsWidthHeight (int width, int height) |
void | keepAspectRatio (bool kAR) |
void | setStaticXY (float x, float y) |
Public Member Functions inherited from DrawingArea | |
DrawingArea (void) | |
DrawingArea (int width, int height) | |
virtual | ~DrawingArea (void) |
void | connectDrawEvent (GCallback callBack, gpointer data) |
Public Member Functions inherited from Surface | |
Surface () | |
Surface (int width, int height) | |
virtual | ~Surface (void) |
GtkWidget * | getWidget (void) |
cairo_surface_t * | getSurface (void) |
void | setSurface (cairo_surface_t *surface_) |
void | clear () |
Public Member Functions inherited from Widget | |
Widget () | |
Construcotr. More... | |
Widget (GtkWidget *w) | |
virtual | ~Widget () |
Destructor. More... | |
GtkWidget * | ref (void) |
void | unref (void) |
GtkWidget * | show (void) |
GtkWidget * | hide (void) |
bool | getVisible (void) |
GtkWidget * | getWidget (void) |
bool | getSensitive (void) |
void | setSensitive (bool sens) |
void | getSize (int &width, int &height) |
virtual void | setSize (int width, int height) |
void | getLocationSize (int &x, int &y, int &width, int &height) |
void | queueDraw () |
GdkWindow * | getWindow () |
void | connect (const char *event, GCallback callback, gpointer data) |
void | connectAfter (const char *event, GCallback callback, gpointer data) |
void | connectExposeEventCallback (GCallback callback, void *data) |
void | connectExposeEventCallback (GtkWidget *w, GCallback callback, void *data) |
void | connectConfigureEventCallback (GCallback callback, void *data) |
void | connectConfigureEventCallback (GtkWidget *w, GCallback callback, void *data) |
Widget & | operator<< (DragNDrop &dnd) |
Widget & | operator>> (DragNDrop &dnd) |
Private Member Functions | |
void | clearMovingBox (cairo_t *cr) |
void | clearBoxes (cairo_t *cr) |
Reraw the backing pixmap as appropriate. More... | |
virtual void | move (GtkWidget *widget, gdouble x, gdouble y) |
virtual void | draw (GtkWidget *widget, gdouble x, gdouble y) |
virtual void | erase (GtkWidget *widget, gdouble x, gdouble y) |
virtual void | reSize (GtkWidget *widget, gdouble xIn, gdouble yIn) |
virtual void | leaveEvent () |
void | init (float w, float h) |
Private Attributes | |
CairoBox | staticBox |
The box which is drawn on the mouse click. More... | |
CairoBox | movingBox |
The box which highlights the current hover point. More... | |
ColourLineSpec | backgroundColour |
The colour of the background. More... | |
ColourLineSpec | staticColour |
The colour of the static button clicked box. More... | |
ColourLineSpec | movingColour |
The colour of the static button clicked box. More... | |
cairo_surface_t * | staticSurface |
The original pixmap rectangle for the static box. More... | |
cairo_surface_t * | movingSurface |
The original pixmap rectangle for the moving box. More... | |
bool | constrainAspectRatio |
If set, then retain the aspect ratio when setting the width or height. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Surface | |
virtual gboolean | configureEvent (GdkEventConfigure *event) |
virtual bool | exposeEvent () |
void | destroySurface (void) |
void | init (int width, int height) |
void | connectDamagedCallback (GCallback callback, void *data) |
Protected Member Functions inherited from Widget | |
virtual bool | checkDropValidity (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData) |
virtual bool | dragDataReceived (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData, int length) |
virtual void | dragLeave (GtkWidget *w, GtkWidget *sourceWidget) |
virtual bool | dragMotion (GtkWidget *w, GtkWidget *sourceWidget, int x, int y) |
virtual int | chooseTheTargetToUse (GtkWidget *w, GtkWidget *sourceWidget, DragNDrop &dnd) |
virtual void | dragDataGet (GtkWidget *w, GtkSelectionData *selectionData, guint info) |
virtual void | dragDataDelete (GtkWidget *w) |
virtual void | dragBegin (GtkWidget *w) |
virtual void | dragEnd (GtkWidget *w) |
Static Protected Member Functions inherited from Surface | |
static gboolean | configureEventStatic (GtkWidget *widget, GdkEventConfigure *event, gpointer data) |
static gboolean | exposeEventStatic (GtkWidget *widget, GdkEventExpose *event, gpointer data) |
Protected Attributes inherited from Surface | |
cairo_surface_t * | surface |
The backing surface for the drawing area. More... | |
Protected Attributes inherited from Widget | |
GtkWidget * | widget |
The container based widget. More... | |
Overloads the DrawingArea methods to show a moving selection box in a pixmap. Draws on the widget rather then the backing pixmap. This class is used to show a moving selection box (movingBox) when the mouse moves over the drawing area. When the user presses the button, then the static selection box (staticBox) is shown at the selected location.
Definition at line 38 of file SelectionArea.H.
|
inline |
Constructor.
Definition at line 182 of file SelectionArea.H.
|
inline |
Construct give box dimensions.
boxWidth | The rectangular selection window width. |
boxHeight | The rectangular selection window height. |
Definition at line 190 of file SelectionArea.H.
|
inlinevirtual |
Destructor.
Definition at line 196 of file SelectionArea.H.
|
inline |
Move the static box to the centre of the image.
Definition at line 225 of file SelectionArea.H.
|
inlineprivate |
Reraw the backing pixmap as appropriate.
Definition at line 65 of file SelectionArea.H.
|
inlineprivate |
Clear only the moving box. Also sets up the source surface.
Definition at line 54 of file SelectionArea.H.
|
inlineprivatevirtual |
Draw the static box on the screen. Redraw the backing pixmap and then the staticBox.
widget | The widget to draw on. |
x | The ordinate to draw to. |
y | The coordinate to draw to. |
Reimplemented from DrawingArea.
Definition at line 100 of file SelectionArea.H.
|
inlineprivatevirtual |
DrawingArea::erase is mapped to reSize Redraw the backing pixmap and then the staticBox.
widget | The widget to draw on. |
x | The ordinate to draw to. |
y | The coordinate to draw to. |
Reimplemented from DrawingArea.
Definition at line 124 of file SelectionArea.H.
|
inlinevirtual |
On the expose event ensure that the boxes are redrawn.
Definition at line 237 of file SelectionArea.H.
|
inline |
Get a copy of the staticBox.
Definition at line 219 of file SelectionArea.H.
|
inlineprivate |
Initialise the member variables. constrainAspectRation is false, allowing arbitrary changes in width and height. The moving box colour is orange and the static box colour is red.
w | The width of the rectangles |
h | The height of the rectangles |
Definition at line 170 of file SelectionArea.H.
|
inline |
Set whether the keep the aspect ratio (constrainAspectRatio).
kAR | True to maintain and false to allow widths and heights to change as they wish. |
Definition at line 333 of file SelectionArea.H.
|
inlineprivatevirtual |
When the mouse leaves, clear the movingBox, and put it off screen but not the staticBox.
Reimplemented from DrawingArea.
Definition at line 156 of file SelectionArea.H.
|
inlineprivatevirtual |
Move the movingBox. Redraw the backing pixmap region of the last box and then draw the box on the widget.
widget | The widget to move the brush on. |
x | The ordinate to draw to. |
y | The coordinate to draw to. |
Reimplemented from DrawingArea.
Definition at line 76 of file SelectionArea.H.
|
inlinevirtual |
Refresh (redraw) the static and mooving boxes.
cr | the cairo context to draw in. |
Definition at line 208 of file SelectionArea.H.
|
inlineprivatevirtual |
resize the boxes on the screen. Redraw the backing pixmap and then the staticBox.
widget | The widget to draw on. |
xIn | The ordinate for finding the new width size. |
yIn | The coordinate for finding the new height size. |
Definition at line 134 of file SelectionArea.H.
|
inline |
Resize the moving and static box's height
height | The new height. |
Definition at line 270 of file SelectionArea.H.
|
inline |
Resize the moving and static box's width and height
width | The new width. |
height | The new height. |
Definition at line 294 of file SelectionArea.H.
|
inline |
Resize the moving and static box's width
width | The new width. |
Definition at line 247 of file SelectionArea.H.
|
inline |
Set the static box's X and Y locations.
x | The x location of the static box |
y | The y location of the static box |
Definition at line 341 of file SelectionArea.H.
|
private |
The colour of the background.
Definition at line 42 of file SelectionArea.H.
|
private |
If set, then retain the aspect ratio when setting the width or height.
Definition at line 49 of file SelectionArea.H.
|
private |
The box which highlights the current hover point.
Definition at line 40 of file SelectionArea.H.
|
private |
The colour of the static button clicked box.
Definition at line 44 of file SelectionArea.H.
|
private |
The original pixmap rectangle for the moving box.
Definition at line 47 of file SelectionArea.H.
|
private |
The box which is drawn on the mouse click.
Definition at line 39 of file SelectionArea.H.
|
private |
The colour of the static button clicked box.
Definition at line 43 of file SelectionArea.H.
|
private |
The original pixmap rectangle for the static box.
Definition at line 46 of file SelectionArea.H.
GTK+ IOStream
Beta
|