gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
Window Class Reference

#include <Window.H>

Inheritance diagram for Window:
[legend]
Collaboration diagram for Window:
[legend]

Public Types

enum  BorderFillOptions { BORDER_LEFT =1, BORDER_RIGHT =2, BORDER_TOP =4, BORDER_BOTTOM =8 }
 

Public Member Functions

 Window (int width, int height, bool resiseable=true)
 default constructor More...
 
 Window ()
 
void init (int width=0, int height=0, bool resiseable=true)
 the initialisation of the window (common to both constructors) More...
 
void setBackgroundColour (GdkColor *colour, GtkStateType state=GTK_STATE_NORMAL)
 
void setBackgroundColour (const char *colourName, GtkStateType state=GTK_STATE_NORMAL)
 
- Public Member Functions inherited from Container
void setBorder (unsigned int size)
 
unsigned int getBorder (void)
 
Containeroperator<< (Container &c)
 
Containeroperator<< (Container *c)
 
Containeroperator<< (Widget &w)
 
Containeroperator<< (Widget *w)
 
virtual Containeroperator<< (GtkWidget *w)
 
Containeroperator<< (LinkList< GtkWidget *> &ll)
 
Containeroperator>> (GtkWidget *w)
 
Containeroperator>> (Container *c)
 
Containeroperator>> (Container &c)
 
Containeroperator>> (LinkList< GtkWidget *> &ll)
 
void setChildrensSensitivity (bool sens)
 
bool areAnyChildrensSensitive (void)
 
unsigned int size ()
 
- 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)
 
Widgetoperator<< (DragNDrop &dnd)
 
Widgetoperator>> (DragNDrop &dnd)
 

Static Public Member Functions

static bool fillBorder (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 
static bool fillBannerTop (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 
static bool fillBannerMiddle (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 
static bool fillBannerBottom (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 

Public Attributes

int borderFill
 Used if the fillBorder callback is in use. More...
 

Private Member Functions

bool fillBorderImplementation (GtkWidget *winIn, int borderFillVar=-1)
 

Additional Inherited Members

- Protected Member Functions inherited from Container
virtual void pack (GtkWidget *obj)
 
- 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)
 
- Protected Attributes inherited from Widget
GtkWidget * widget
 The container based widget. More...
 

Detailed Description

Member Enumeration Documentation

◆ BorderFillOptions

Enumerator
BORDER_LEFT 
BORDER_RIGHT 
BORDER_TOP 
BORDER_BOTTOM 

Definition at line 109 of file Window.H.

Constructor & Destructor Documentation

◆ Window() [1/2]

Window::Window ( int  width,
int  height,
bool  resiseable = true 
)
inline

default constructor

Get the window widget

Returns
the GtkWidget winconstructor specifying window size and resideable options
Parameters
widththe width of the window
heightthe height of the window
resiseablewhether the window can be resised.

Definition at line 133 of file Window.H.

Here is the call graph for this function:

◆ Window() [2/2]

Window::Window ( )
inline

Definition at line 137 of file Window.H.

Here is the call graph for this function:

Member Function Documentation

◆ fillBannerBottom()

static bool Window::fillBannerBottom ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)
inlinestatic

Callback method to fill the boarder as if a bottom banner were present

Parameters
widgetThe widget which triggered the event
eventThe event which was triggered
dataA pointer to this instance
Returns
false to keep propagating the event

Definition at line 219 of file Window.H.

Here is the call graph for this function:

◆ fillBannerMiddle()

static bool Window::fillBannerMiddle ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)
inlinestatic

Callback method to fill the boarder as if a middle banner were present

Parameters
widgetThe widget which triggered the event
eventThe event which was triggered
dataA pointer to this instance
Returns
false to keep propagating the event

Definition at line 208 of file Window.H.

Here is the call graph for this function:

◆ fillBannerTop()

static bool Window::fillBannerTop ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)
inlinestatic

Callback method to fill the boarder as if a top banner were present

Parameters
widgetThe widget which triggered the event
eventThe event which was triggered
dataA pointer to this instance
Returns
false to keep propagating the event

Definition at line 197 of file Window.H.

Here is the call graph for this function:

◆ fillBorder()

static bool Window::fillBorder ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  data 
)
inlinestatic

Callback method to fill the boarder from the edge of the widget to the edge of this window. this->borderFill = BORDER_LEFT|BORDER_RIGHT will fill both left and right borders The fill colour is made to be the same as the widget backround colour. The following example is for a HBox, but could also be a VBox or any other widget.

HBox.connectAfter("expose-event", G_CALLBACK(GTKWindow.fillBorder), (gpointer)&GTKWindow);
HBox.connectAfter("visibility-notify-event", G_CALLBACK(GTKWindow.fillBorder), (gpointer)&GTKWindow);

In this example, the border between the widget and the GTKWindow is filled with the widget's background colour.

Parameters
widgetThe widget which triggered the event
eventThe event which was triggered
dataA pointer to this instance
Returns
false to keep propagating the event

Definition at line 186 of file Window.H.

Here is the call graph for this function:

◆ fillBorderImplementation()

bool Window::fillBorderImplementation ( GtkWidget *  winIn,
int  borderFillVar = -1 
)
inlineprivate

Definition at line 28 of file Window.H.

Here is the caller graph for this function:

◆ init()

void Window::init ( int  width = 0,
int  height = 0,
bool  resiseable = true 
)
inline

the initialisation of the window (common to both constructors)

Parameters
widththe width of the window
heightthe height of the window
resiseablewhether the window can be resised.

Definition at line 147 of file Window.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBackgroundColour() [1/2]

void Window::setBackgroundColour ( GdkColor *  colour,
GtkStateType  state = GTK_STATE_NORMAL 
)
inline

set the background colour of the top window

Parameters
colourThe GdkColour to change the background to
stateThe colour for a particular state. Defaults to GTK_STATE_NORMAL

Definition at line 159 of file Window.H.

Here is the caller graph for this function:

◆ setBackgroundColour() [2/2]

void Window::setBackgroundColour ( const char *  colourName,
GtkStateType  state = GTK_STATE_NORMAL 
)
inline

set the background colour of the top window

Parameters
colourNameThe name of the colour to use. e.g. "white"
stateThe colour for a particular state. Defaults to GTK_STATE_NORMAL

Definition at line 167 of file Window.H.

Here is the call graph for this function:

Member Data Documentation

◆ borderFill

int Window::borderFill

Used if the fillBorder callback is in use.

Definition at line 110 of file Window.H.


The documentation for this class was generated from the following file:
gtkIOStream: Window Class Reference
GTK+ IOStream  Beta