vdk 2.4.0
Public Member Functions | Public Attributes | Protected Attributes | Friends
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

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:
objthe object to be added
justifywhere the object wil be added, can be:
  • l_justify packed to end (appended)
  • r_justify packed to start (prepended)
expandif true object will expand
fillif true object will fill all available space
paddinghow many pixels are left around object

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

GtkWidget * VDKObject::ConnectingWidget ( )

Same as WrappedWidget().

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.

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

Draw an object

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:
objconnected object
eventevent to be connected
methodclass 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:
eventevent to be connected
methodclass 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:
connectionmust be achieved with a previous EventConnect() call
VDKRgb VDKObject::GetBackground ( GtkStateType  state = GTK_STATE_NORMAL)

Gets object background color

VDKCursorType VDKObject::GetCursor ( ) [inline]

Gets object assigned cursor

VDKFont* VDKObject::GetFont ( ) [inline]

Gets object font

VDKRgb VDKObject::GetForeground ( GtkStateType  state = GTK_STATE_NORMAL)

Gets object foreground color

bool VDKObject::GetVisible ( ) [inline]

Returns object visibility

Reimplemented in VDKForm.

Grab the focus to itself

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

returns an enum id (incomplete and not so useful)

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

ItemList& VDKObject::Items ( ) [inline]

Return contained objects list

VDKForm* VDKObject::Owner ( ) [inline]

Returns object owner form.

Reimplemented in VDKForm.

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

Sets object parenthood

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

Sets object background

Parameters:
colora VDKRgb object
statecan be one of the gtk+ widget states

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

void VDKObject::SetCursor ( VDKCursorType  curType)

Sets object assigned cursor

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

Sets object foreground

Parameters:
colora VDKRgb object
statecan be one of the gtk+ widget states

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

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

Sets object minimum size

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

Sets object tip.

Reimplemented in VDKTooltip.

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

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

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

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

Sets object minimum size

Parameters:
s,aVDKPoint object
void VDKObject::SetVisible ( bool  visible)

Set object visibility

Parameters:
visibleeither true or false

Reimplemented in VDKForm.

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:
objconnected object
signalsignal to be connected
methodclass 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:
signalsignal to be connected
methodclass 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:
connectionmust be achieved with a previous SignalConnect() call
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
GtkWidget * VDKObject::Widget ( ) [virtual]

Returns underlying GTK+ widget.

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.


Member Data Documentation

VDKReadWriteValueProp<VDKObject,VDKCursorType> VDKObject::Cursor

Setting this property will set/get object cursor type.

VDKReadWriteValueProp<VDKObject,bool> VDKObject::Enabled

Setting this property will set/get object sensitivity.

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");

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.

Object parent, where the signal flows if not stopped

stock connected signal

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()

SizeObjectProp VDKObject::Usize

Setting this property will set/get object minimum size.

VDKReadWriteValueProp<VDKObject,bool> VDKObject::Visible

Setting this property will show/hide or get object visibility

Reimplemented in VDKForm.

GtkWidget* VDKObject::widget [protected]

underlaying gtk+ widget


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