vdk 2.4.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
VDKForm Class Referenceabstract

VDKForm widgets, generally the outermost widget container. More...

#include <forms.h>

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

Public Member Functions

 VDKForm (VDKApplication *app, char *title=(char *) NULL, int mode=v_box, GtkWindowType display=GTK_WINDOW_TOPLEVEL)
 
 VDKForm (VDKForm *owner, char *title=(char *) NULL, int mode=v_box, GtkWindowType display=GTK_WINDOW_TOPLEVEL)
 
virtual ~VDKForm ()
 
bool Destroy ()
 
virtual int isA ()
 
VDKBoxBox ()
 
virtual void Show (GtkWindowPosition pos=GTK_WIN_POS_NONE)
 
virtual void Hide ()
 
virtual void ShowModal (GtkWindowPosition pos=GTK_WIN_POS_NONE)
 
bool IsModal ()
 
virtual void Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=1)
 
VDKFormOwner ()
 
virtual bool CanClose (void)
 
virtual void Close (void)
 
virtual void Setup (void)=0
 
void Raise ()
 
void Lower ()
 
- 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 ()
 
VDKFormOwner ()
 
virtual GtkWidget * Widget ()
 
GtkWidget * ConnectingWidget ()
 
GtkWidget * WrappedWidget ()
 
virtual void SetFont (VDKFont *f)
 
VDKFontGetFont ()
 
void SetVisible (bool visible)
 
bool GetVisible ()
 
void SetCursor (VDKCursorType)
 
VDKCursorType GetCursor ()
 
virtual void SetForeground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
 
virtual void SetBackground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
 
void SetSize (int w, int h)
 
void SetUsize (VDKPoint s)
 
virtual void SetTip (char *)
 
ItemListItems ()
 
void Draw (GdkRectangle *area=NULL)
 
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)
 

Protected Attributes

VDKApplicationapp
 
ChildList childs
 
GtkWidget * window
 
VDKBoxbox
 
bool isModal
 
bool never_showed
 
VDKPoint _oldSize
 
int modalCount
 
- Protected Attributes inherited from VDKObject
VDKObjectSignal s_clicked
 
GtkWidget * widget
 
GtkWidget * sigwid
 
VDKObjectparent
 

Private Member Functions

 VDKForm (VDKForm &)
 
VDKFormoperator= (VDKForm &)
 

Additional Inherited Members

- 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
 

Detailed Description

VDKForm widgets, generally the outermost widget container.

This class provides a common interface with GTK+ windows that are here called "Forms". VDKForm provides common functionalities for all derived classes.


Constructor & Destructor Documentation

§ VDKForm() [1/3]

VDKForm::VDKForm ( VDKForm )
inlineprivate

copy and assignement prohibited

§ VDKForm() [2/3]

VDKForm::VDKForm ( VDKApplication app,
char *  title = (char *) NULL,
int  mode = v_box,
GtkWindowType  display = GTK_WINDOW_TOPLEVEL 
)

constructor, makes a main form, application child

Parameters
appthe application that owns the form
title
modeas inner box should be, either vertical (v_box) or horizontal (h_box)
displaydisplay type can be one of the following:
  • GTK_WINDOW_TOPLEVEL
  • GTK_WINDOW_DIALOG
  • GTK_WINDOW_POPUP behavio_ vdksdl_form_hur depends on window manager

§ VDKForm() [3/3]

VDKForm::VDKForm ( VDKForm owner,
char *  title = (char *) NULL,
int  mode = v_box,
GtkWindowType  display = GTK_WINDOW_TOPLEVEL 
)

constructor, makes a child form

Parameters
ownerthe form that owns the child form
title
modeas inner box should be, either vertical (v_box) or horizontal (h_box)
displaydisplay type can be one of the following:
  • GTK_WINDOW_TOPLEVEL
  • GTK_WINDOW_DIALOG
  • GTK_WINDOW_POPUP behaviour depends on window manager

§ ~VDKForm()

VDKForm::~VDKForm ( )
virtual

Destructor

Member Function Documentation

§ Add()

void VDKForm::Add ( VDKObject obj,
int  justify = l_justify,
int  expand = TRUE,
int  fill = TRUE,
int  padding = 1 
)
virtual

Add an object to the form. Tip: <obj> will be actually added to inner box same as form->Box()->Add();

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 objet will expand from container center
fillif true object will fill all available space
paddinghow many pixels are left around object

Reimplemented from VDKObject.

§ Box()

VDKBox* VDKForm::Box ( )
inline

return inner box

§ CanClose()

bool VDKForm::CanClose ( void  )
virtual

Placeholder for subclasses. User should override this returning a false (don't close) or true (close) value.

Reimplemented in VDKFileDialog, and VDKFileIconDialog.

§ Close()

void VDKForm::Close ( void  )
virtual

Closes the form, if form is main application form it quits application as well. Call CanClose() before, if it returns true closes the form otherwise form won't be closed.

§ Destroy()

bool VDKForm::Destroy ( )

Explicitely destroy a form.

§ Hide()

void VDKForm::Hide ( )
virtual

Hides form

§ isA()

virtual int VDKForm::isA ( )
inlinevirtual

returns an enum id (incomplete and not so useful)

Reimplemented from VDKObject.

§ IsModal()

bool VDKForm::IsModal ( )
inline

Return if a showed window is modal or not

§ Lower()

void VDKForm::Lower ( )

Lower form

§ operator=()

VDKForm& VDKForm::operator= ( VDKForm )
inlineprivate

copy and assignement prohibited

§ Owner()

VDKForm* VDKForm::Owner ( )
inline

Return form owner Tip: returns NULL id <this> is main form

§ Raise()

void VDKForm::Raise ( )

Raises form

§ Setup()

virtual void VDKForm::Setup ( void  )
pure virtual

Must be overridden by subclasses, in this method user fills form with useful widgets

Reimplemented from VDKObject.

Implemented in VDKFileDialog, VDKFileChooser, VDKFileSel, and VDKFileIconDialog.

§ Show()

void VDKForm::Show ( GtkWindowPosition  pos = GTK_WIN_POS_NONE)
virtual

Shows form.

Parameters
posindicates initial form position, can be one of the following:
  • GTK_WIN_POS_NONE
  • GTK_WIN_POS_CENTER
  • GTK_WIN_POS_MOUSE
  • GTK_WIN_POS_CENTER_ALWAYS

§ ShowModal()

void VDKForm::ShowModal ( GtkWindowPosition  pos = GTK_WIN_POS_NONE)
virtual

Shows a form in modal behaviour

Parameters
posindicates initial form position, can be one of the following:
  • GTK_WIN_POS_NONE
  • GTK_WIN_POS_CENTER
  • GTK_WIN_POS_MOUSE
  • GTK_WIN_POS_CENTER_ALWAYS

Member Data Documentation

§ _oldSize

VDKPoint VDKForm::_oldSize
protected

size storage

§ app

VDKApplication* VDKForm::app
protected

owner application address

§ box

VDKBox* VDKForm::box
protected

default inner box

§ childs

ChildList VDKForm::childs
protected

child and child garbage list

§ isModal

bool VDKForm::isModal
protected

modal flag

§ modalCount

int VDKForm::modalCount
protected

counts how many modal childs we have should be always max 1

§ never_showed

bool VDKForm::never_showed
protected

never showed flag

§ window

GtkWidget* VDKForm::window
protected

underlaying gtk+ window


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