VDKObject Class Reference

#include <vdkobj.h>

Inheritance diagram for VDKObject:

VDKNotCopyAble VDKAbstractButton VDKCanvas VDKCombo VDKComboEntry VDKCustom VDKCustomButton VDKDataBox VDKDrawingArea VDKEditor VDKEntry VDKForm VDKImage VDKInputChannel VDKLabel VDKMenuItem VDKObjectContainer VDKOptionMenu VDKPixmap VDKProgressBar VDKSeparator VDKSlider VDKSpinButton VDKStatusbar VDKTimer VDKTooltip VDKTreeView

List of all members.

Public Member Functions

Public Attributes

Protected Attributes

Friends


Detailed Description

This class is the base class of a wide hierarchy, provides common functionalities to all derived classe

Constructor & Destructor Documentation

VDKObject::VDKObject ( VDKForm owner = NULL  ) 

Constructor, make an object that belongs to <owner> form.

VDKObject::VDKObject ( VDKForm owner,
GtkWidget *  widget 
)

Contructor, makes an object instance from an already gtk+ created object.

VDKObject::~VDKObject (  )  [virtual]

Destructor


Member Function Documentation

VDKRgb VDKObject::GetBackground ( GtkStateType  state = GTK_STATE_NORMAL  ) 

Gets object background color

VDKRgb VDKObject::GetForeground ( GtkStateType  state = GTK_STATE_NORMAL  ) 

Gets object foreground color

bool VDKObject::Destroy (  ) 

Explicitely destroy an object freeing associated memory.

Tip: never use delete operator otherwise garbage collection will fail and program probably will crash.

Reimplemented in VDKForm.

virtual int VDKObject::isA (  )  [inline, virtual]

returns an enum id (incomplete and not so useful)

Reimplemented in VDKChart, VDKLineChart, VDKScatteredChart, VDKBarChart, and VDKForm.

VDKForm* VDKObject::Owner (  )  [inline]

Returns object owner form.

Reimplemented in VDKForm.

GtkWidget * VDKObject::Widget (  )  [virtual]

Returns underlying GTK+ widget.

GtkWidget * VDKObject::ConnectingWidget (  ) 

Same as WrappedWidget().

GtkWidget * VDKObject::WrappedWidget (  ) 

Returns underlying wrapped Gtk+ widget, useful in those cases when VDKObject is a composite one. Happens in many composite widgets, i.e a container with some inner widgets, that underlaying widget isn't which answers to signals. In this case the container is the <widget> and one of the inner widgets is the <sigwid>, wich is responsible to answers signal/event.You have to connect with the last one. An example is VDKText where Widget() return packing box not text itself. Tip: In doubt use always WrappedWidget() instead of Widget(), is always safer.

void VDKObject::SetFont ( VDKFont f  )  [virtual]

VDKFont* VDKObject::GetFont (  )  [inline]

Gets object font

void VDKObject::SetVisible ( bool  visible  ) 

Set object visibility

Parameters:
visible either true or false

Reimplemented in VDKForm.

bool VDKObject::GetVisible (  )  [inline]

Returns object visibility

Reimplemented in VDKForm.

void VDKObject::SetCursor ( VDKCursorType  curType  ) 

Sets object assigned cursor

VDKCursorType VDKObject::GetCursor (  )  [inline]

Gets object assigned cursor

void VDKObject::SetForeground ( VDKRgb  color,
GtkStateType  state = GTK_STATE_NORMAL 
) [virtual]

Sets object foreground

Parameters:
color a VDKRgb object
state can be one of the gtk+ widget states

Reimplemented in VDKAbstractButton, VDKCanvas, VDKCheckButton, VDKEntry, VDKSpinButton, VDKComboEntry, VDKCustom, VDKCustomButton, VDKDrawingArea, VDKEditor, and VDKTextView.

void VDKObject::SetBackground ( VDKRgb  color,
GtkStateType  state = GTK_STATE_NORMAL 
) [virtual]

Sets object background

Parameters:
color a VDKRgb object
state can be one of the gtk+ widget states

Reimplemented in VDKCanvas, VDKCombo, VDKEntry, VDKSpinButton, VDKComboEntry, VDKCustom, VDKDataBox, VDKDrawingArea, VDKEditor, and VDKTextView.

void VDKObject::SetSize ( int  w,
int  h 
) [inline]

Sets object minimum size

Parameters:
w width
h height

void VDKObject::SetUsize ( VDKPoint  s  )  [inline]

Sets object minimum size

Parameters:
s,a VDKPoint object

void VDKObject::SetTip ( char *  t  )  [virtual]

Sets object tip.

Reimplemented in VDKTooltip.

void VDKObject::Add ( VDKObject obj,
int  justify = l_justify,
int  expand = TRUE,
int  fill = TRUE,
int  padding = 0 
) [virtual]

Add on abiect to the object.

Parameters:
obj the object to be added
justify where the object wil be added, can be:
  • l_justify packed to end (appended)
  • r_justify packed to start (prepended)
expand if true object will expand
fill if true object will fill all available space
padding how many pixels are left around object

Reimplemented in VDKBox, VDKEventBox, VDKFixed, VDKForm, VDKFrame, VDKHandleBox, VDKMenu, VDKMenubar, VDKNotebook, VDKPaned, VDKRadioButtonGroup, VDKScrolled, VDKTable, VDKToolbar, and VDKObjectContainer.

ItemList& VDKObject::Items (  )  [inline]

Return contained objects list

void VDKObject::Draw ( GdkRectangle *  area = NULL  ) 

Draw an object

virtual void VDKObject::Setup ( void   )  [inline, virtual]

placeholder for subclasses. This method is called whenever an object is added to a container.

Reimplemented in VDKFileDialog, VDKFileSel, VDKForm, VDKFileChooser, VDKFileIconDialog, and VDKHLButton.

void VDKObject::SignalEmit ( int  signal  ) 

Emit a signal (static tables)

Parameters:
signal 

void VDKObject::SignalEmit ( char *  sig  ) 

Emit a signal (dynamic tables)

Parameters:
signal 

void VDKObject::SignalEmitParent ( int  signal  )  [inline]

Emit a signal directly to parent (static tables)

Parameters:
signal 

void VDKObject::SignalEmitParent ( char *  sig  ) 

Emit a signal directly to parent (dynamic tables)

Parameters:
signal 

void VDKObject::GrabFocus (  ) 

Grab the focus to itself

VDKObject* VDKObject::Parent ( VDKObject p = NULL  )  [inline]

Sets object parenthood

int VDKObject::SignalConnect ( VDKObject obj,
char *  signal,
bool(VDKObject::*)(VDKObject *)  method,
bool  gtk = true,
bool  after = false 
) [inline]

Placeholder for subclasses, at this level does nothing. Connects an object-signal to a <this> method

Parameters:
obj connected object
signal signal to be connected
method class method that answers to signal
gtk (default is true) if you set this arg to false no real connection is made with gtk+ signal system and signal is handled internally by vdk. This allow to define and use your own signals without register them to gtk+
after (default is false) if set to true connect signal in the "after" slot, meaninigfull only if previous <gtk> arg is set to true.

int VDKObject::SignalConnect ( char *  signal,
bool(VDKObject::*)(VDKObject *)  method,
bool  gtk = true,
bool  after = false 
) [inline]

Placeholder for subclasses, at this level does nothing. Connects <this>-signal to a <this> method

Parameters:
signal signal to be connected
method class method that answers to signal
gtk (default is true) if you set this arg to false no real connection is made with gtk+ signal system and signal is handled internally by vdk. This allow to define and use your own signals without register them to gtk+
after (default is false) if set to true connect signal in the "after" slot, meaninigfull only if previous <gtk> arg is set to true.

bool VDKObject::SignalDisconnect ( int  connection  )  [inline]

disconnect this from connection

Parameters:
connection must be achieved with a previous SignalConnect() call

int VDKObject::EventConnect ( VDKObject obj,
char *  event,
bool(VDKObject::*)(VDKObject *, GdkEvent *)  method,
bool  after = false 
) [inline]

Placeholder for subclasses, at this level does nothing. connects an object-event to a <this> method

Parameters:
obj connected object
event event to be connected
method class method that answers to signal
after (default is false) if set to true connect signal in the "after" slot.

int VDKObject::EventConnect ( char *  ,
bool(VDKObject::*)(VDKObject *, GdkEvent *)  ,
bool  after = false 
) [inline]

Placeholder for subclasses, at this level does nothing. connects an <this>-event to a <this> method

Parameters:
event event to be connected
method class method that answers to signal
after (default is false) if set to true connect signal in the "after" slot.

bool VDKObject::EventDisconnect ( int  connection  )  [inline]

disconnect this from connection

Parameters:
connection must be achieved with a previous EventConnect() call


Member Data Documentation

Setting one of these this properties will set/get object background color. Naming convention follows Gtk+ one. Example: form->NormalBackground = VDKRgb(255,0,0); (Tip: VDKRgb is a structure defined in vdkutils.h. Remember that some objects are transparent, so if you want to set the background color, you actually have to set the background color of the parent, VDKLabel is an example.

VDKReadWriteValueProp<VDKObject,VDKFont*> VDKObject::Font

Setting this property will set the object font.

i.e.: obj->Font = new VDKFont(obj,"X-font-string-chock-full-o-dashes-goes-in-here");

SizeObjectProp VDKObject::Usize

Setting this property will set/get object minimum size.

VDKReadWriteValueProp<VDKObject,bool> VDKObject::Enabled

Setting this property will set/get object sensitivity.

VDKReadWriteValueProp<VDKObject,VDKCursorType> VDKObject::Cursor

Setting this property will set/get object cursor type.

VDKReadWriteValueProp<VDKObject,bool> VDKObject::Visible

Setting this property will show/hide or get object visibility

Reimplemented in VDKForm.

stock connected signal

GtkWidget* VDKObject::widget [protected]

underlaying gtk+ widget

GtkWidget* VDKObject::sigwid [protected]

underlaying gtk+ widget widget and sigwid could be different, e.g into composite widget made of a container with some inner widget. See Widget() and WrappedWidget()

Object parent, where the signal flows if not stopped


The documentation for this class was generated from the following files:

Generated on Tue May 6 03:40:11 2008 for vdk 2.4.0 by  doxygen 1.5.5