vdk 2.4.0
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
VDKCustom Class Reference

This is a base class for derived VDKCustomList and VDKCustomTree Provides common functionalities for both child classes. More...

#include <vdkcustom.h>

Inheritance diagram for VDKCustom:
Inheritance graph
[legend]
Collaboration diagram for VDKCustom:
Collaboration graph
[legend]

Public Member Functions

int ColumnClicked ()
 
GtkSelectionMode SelectionMode ()
 
GtkWidget * CustomWidget ()
 
void ActiveTitle (int col, bool flag=true)
 
void ActiveTitles (bool flag=true)
 
void EnableTitles (bool flag=true)
 
void Freeze ()
 
void Thaw ()
 
virtual void Clear ()
 
int Size ()
 
void ColumnSize (int col, int size)
 
void AutoResizeColumn (int col, bool flag)
 
virtual void SetForeground (VDKRgb, GtkStateType)
 
virtual void SetFont (VDKFont *)
 
- Public Member Functions inherited from VDKObject
VDKRgb GetBackground (GtkStateType state=GTK_STATE_NORMAL)
 
VDKRgb GetForeground (GtkStateType state=GTK_STATE_NORMAL)
 
 VDKObject (VDKForm *owner=NULL)
 
 VDKObject (VDKForm *owner, GtkWidget *widget)
 
virtual ~VDKObject ()
 
bool Destroy ()
 
virtual int isA ()
 
VDKFormOwner ()
 
virtual GtkWidget * Widget ()
 
GtkWidget * ConnectingWidget ()
 
GtkWidget * WrappedWidget ()
 
VDKFontGetFont ()
 
void SetVisible (bool visible)
 
bool GetVisible ()
 
void SetCursor (VDKCursorType)
 
VDKCursorType GetCursor ()
 
void SetSize (int w, int h)
 
void SetUsize (VDKPoint s)
 
virtual void SetTip (char *)
 
virtual void Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=0)
 
ItemListItems ()
 
void Draw (GdkRectangle *area=NULL)
 
virtual void Setup ()
 
void SignalEmit (int signal)
 
void SignalEmit (char *sig)
 
void SignalEmitParent (int signal)
 
void SignalEmitParent (char *sig)
 
void GrabFocus ()
 
VDKObjectParent (VDKObject *p=NULL)
 
int SignalConnect (VDKObject *obj, char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
 
int SignalConnect (char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
 
bool SignalDisconnect (int connection)
 
int EventConnect (VDKObject *obj, char *event, bool(VDKObject::*method)(VDKObject *, GdkEvent *), bool after=false)
 
int EventConnect (char *, bool(VDKObject::*)(VDKObject *, GdkEvent *), bool after=false)
 
bool EventDisconnect (int connection)
 

Public Attributes

VDKReadWriteValueProp< VDKCustom, GtkPolicyType > VPolicy
 
VDKReadWriteValueProp< VDKCustom, GtkPolicyType > HPolicy
 
VDKReadWriteValueProp< VDKCustom, GtkShadowType > BorderShadow
 
VDKReadWriteValueProp< VDKCustom, int > RowHeight
 
VDKReadWriteValueProp< VDKCustom, bool > AutoResize
 
VDKReadWriteValueProp< VDKCustom, VDKRgbSelectedForeground
 
VDKReadWriteValueProp< VDKCustom, VDKRgbUnselectedBackground
 
VDKReadWriteValueProp< VDKCustom, VDKRgbUnselectedForeground
 
VDKObjectArray Titles
 
VDKReadOnlyValueProp< VDKCustom, int > SelectedTitle
 
- Public Attributes inherited from VDKObject
VDKReadWriteValueProp< VDKObject, VDKRgbNormalBackground
 
VDKReadWriteValueProp< VDKObject, VDKFont * > Font
 
SizeObjectProp Usize
 
VDKReadWriteValueProp< VDKObject, bool > Enabled
 
VDKReadWriteValueProp< VDKObject, VDKCursorType > Cursor
 
VDKReadWriteValueProp< VDKObject, bool > Visible
 

Protected Member Functions

virtual void SetBackground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
 

Additional Inherited Members

- Protected Attributes inherited from VDKObject
VDKObjectSignal s_clicked
 
GtkWidget * widget
 
GtkWidget * sigwid
 
VDKObjectparent
 

Detailed Description

This is a base class for derived VDKCustomList and VDKCustomTree Provides common functionalities for both child classes.

Programming tips
VDKCustom operations are dependent on selection mode that can be one of the following:
  • GTK_SELECTION_SINGLE (default)
  • GTK_SELECTION_BROWSE
  • GTK_SELECTION_MULTIPLE
  • GTK_SELECTION_EXTENDED
Signals
Signals are available for all modes except browse one, but the way you can use them is different for each mode. Basically in single mode you may use Selection property while in other modes you may use Selections() method. It's possible to connect with "click_column" signal using dynamics tables provided that use connects with <gtk> arg set to false.
SignalConnect(aCustom, "click_column",&SomeClass::Response,false);

Member Function Documentation

◆ ActiveTitle()

void VDKCustom::ActiveTitle ( int  col,
bool  flag = true 
)

Sets/unsets active titile

Parameters
col,ordinalposition of the active title
flag,eithertrue (set) or false (unset)

◆ ActiveTitles()

void VDKCustom::ActiveTitles ( bool  flag = true)

Same as above but acts on the entire tuple.

◆ AutoResizeColumn()

void VDKCustom::AutoResizeColumn ( int  col,
bool  flag 
)

Sets/unsets column auto-resize capability

Parameters
col,ordinalposition
flag,eithertrue (sets) or false (unsets)

◆ Clear()

virtual void VDKCustom::Clear ( )
inlinevirtual

Clear widget

Reimplemented in VDKCustomList, and VDKCustomTree.

◆ ColumnClicked()

int VDKCustom::ColumnClicked ( )
inline

Returns wich column was clicked

◆ ColumnSize()

void VDKCustom::ColumnSize ( int  col,
int  size 
)

Set column fixed size

Parameters
col,ordinalposition
size,inpixels

◆ CustomWidget()

GtkWidget* VDKCustom::CustomWidget ( )
inline

Returns underlying custom widget.

Tip:
Use this to access to custom widget, using VDKObject::Widget() will access to the widget container not to custom widget itself.

◆ EnableTitles()

void VDKCustom::EnableTitles ( bool  flag = true)

Set/unset titles sensitivity

Parameters
flag,iffalse titles will be grayed as well.

◆ Freeze()

void VDKCustom::Freeze ( )
inline

Freezes widget during time consuming updating operations

◆ SelectionMode()

GtkSelectionMode VDKCustom::SelectionMode ( )

Returns selection mode

◆ SetBackground()

void VDKCustom::SetBackground ( VDKRgb  color,
GtkStateType  state = GTK_STATE_NORMAL 
)
protectedvirtual

Sets object background

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

Reimplemented from VDKObject.

◆ SetFont()

void VDKCustom::SetFont ( VDKFont f)
virtual

Sets object font

Reimplemented from VDKObject.

◆ SetForeground()

void VDKCustom::SetForeground ( VDKRgb  color,
GtkStateType  state 
)
virtual

Sets object foreground

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

Reimplemented from VDKObject.

◆ Size()

int VDKCustom::Size ( )
inline

Returns how many rows/nodes are into custom widget

◆ Thaw()

void VDKCustom::Thaw ( )
inline

Unfreeze

Member Data Documentation

◆ AutoResize

VDKReadWriteValueProp<VDKCustom,bool> VDKCustom::AutoResize

Use this to set/get auto resize capablity for al columns

◆ BorderShadow

VDKReadWriteValueProp<VDKCustom,GtkShadowType> VDKCustom::BorderShadow

Use this to get/set border shadow

◆ HPolicy

VDKReadWriteValueProp<VDKCustom,GtkPolicyType> VDKCustom::HPolicy

Use this to get/set hor. scrollbar policy

◆ RowHeight

VDKReadWriteValueProp<VDKCustom,int> VDKCustom::RowHeight

Use this to get/set row height

Tip
By default row height is computed using default font.

◆ SelectedForeground

VDKReadWriteValueProp<VDKCustom,VDKRgb> VDKCustom::SelectedForeground

Use this to set colors for selected lines if they should be different from defaults. All new added rows will have this colors. VDKReadWriteValueProp<VDKCustom,VDKColor*> SelectedBackground;

Use this to set colors for selected lines if they should be different from defaults. All new added rows will have this colors.

◆ SelectedTitle

VDKReadOnlyValueProp<VDKCustom,int> VDKCustom::SelectedTitle

<read-only>, use this to know wich title was selected (if any)

◆ Titles

VDKObjectArray VDKCustom::Titles

Since column titles are themselves objects you can use this to access them and set object properties like this:

custom->Titles[0]->Enabled = false;
custom->Titles[0]->Normalbackground = VDKRgb("dodgerblue");

◆ UnselectedBackground

VDKReadWriteValueProp<VDKCustom,VDKRgb> VDKCustom::UnselectedBackground

its use is deprecated, mantained for compat, reverts to NormalBackground

◆ UnselectedForeground

VDKReadWriteValueProp<VDKCustom,VDKRgb> VDKCustom::UnselectedForeground

its use is deprecated, mantained for compat, reverts to Foreground

◆ VPolicy

VDKReadWriteValueProp<VDKCustom,GtkPolicyType> VDKCustom::VPolicy

Use this to get/set vert. scrollbar policy


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