GtkFC API Reference version 0.1.0

Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Examples  

Gwidget Class Reference

#include <Gwidget.h>

Inheritance diagram for Gwidget:

Gobject Gbutton GbuttonRadio GcList GcomboBox Gcontainers Gdialog GentryText Glabel GlistBox GlistBox::GlistItem Gmenu GmenuBar GmenuItem GnoteBook Gpixmap Gtext Gwindow List of all members.

Public Methods

 Gwidget ()
 Gwidget (GtkWidget *w)
virtual ~Gwidget ()
void SetPosition (int x, int y, int w, int h)
GtkWidget* GetMainWidget ()
void SetMainWidget (GtkWidget *w)
Gstring GetName ()
virtual void SetWindowMgr (GwindowMgr *w)
GwindowMgrGetWindowMgr ()
bool Insert (Gwidget *w)
void RegisterEvent (Gevent::EventType event)
void PostEvent (Gevent::EventType event)
virtual void OnEvent (GdkEvent *e, void *user_data)
virtual void OnAction (Gwidget *w, GdkEvent *e)
virtual void Action ()
virtual bool Init ()
virtual void Show ()
bool IsExpandable ()
void SetExpandable (bool expand)

Public Attributes

int X
int Y
int Width
int Height

Protected Methods

virtual void EvtDestroy ()
void Post (Gwidget *w, GdkEvent *e)

Protected Attributes

Gstringname
GwindowMgrwmgr
GtkWidget* MainWidget
bool is_expandable

Detailed Description

The Gwidget class is the base class for all widget. Base and default method for widget are defined here.
Author(s):
Thibaut Nicolas
Version:
0.1.0
Examples:

askyesno.cpp, button.cpp, clist.cpp, and entry.cpp.


Constructor & Destructor Documentation

Gwidget::Gwidget ( )
 

Construct a widget with the given name.

Gwidget::Gwidget ( GtkWidget * w )
 

Construct a widget that is the copy of the given widget WARNING: the instance variables of the object are pointers to the copied object. DO NOT DESTROY a copied widget. USE static reference


Member Function Documentation

void Gwidget::Action ( ) [virtual]
 

Action Performed when event occur on the widget

Examples:
askyesno.cpp.

GtkWidget * Gwidget::GetMainWidget ( )
 

Return the main widget of the Widget as a GTK form

Gstring Gwidget::GetName ( )
 

Return the name of the widget

GwindowMgr * Gwidget::GetWindowMgr ( )
 

Return the window manager of the widget

Examples:
askyesno.cpp.

bool Gwidget::Init ( ) [virtual]
 

Init the widget

Reimplemented in Gdialog, Gmenu, GmenuItem, GmenuBar, GnoteBook::GnoteBookPage, and Gwindow.

bool Gwidget::Insert ( Gwidget * w )
 

Insert a widget in the widget

Reimplemented in Gdialog, and Gwindow.

bool Gwidget::IsExpandable ( )
 

Define if a widget is expandable (can be resized). for examples menubar are not expandable

void Gwidget::OnAction ( Gwidget * w,
GdkEvent * e ) [virtual]
 

Action performed when a child widget sent an event

Reimplemented in Gbutton, Gcontainers, Gdialog, GlistBox, Gmenu, GmenuItem, GmenuBar, GnoteBook::GnoteBookPage, and GnoteBook.

Examples:
askyesno.cpp, button.cpp, clist.cpp, and entry.cpp.

void Gwidget::OnEvent ( GdkEvent * event,
void * user_data ) [virtual]
 

Action performed when an event occur

Reimplemented in Gbutton, GcList, GentryText, GlistBox::GlistItem, GmenuItem, GnoteBook::GnoteBookPage, GnoteBook, and Gwindow.

void Gwidget::PostEvent ( Gevent::EventType event )
 

Send an event to the widget

void Gwidget::RegisterEvent ( Gevent::EventType event )
 

Register an event in the widget The widget will answer to the event

void Gwidget::SetMainWidget ( GtkWidget * w )
 

Set the main widget of the Widget.

Parameters:
w   must be a widget of GtkWidget type

void Gwidget::SetPosition ( int x,
int y,
int w,
int h )
 

Set the position of the widget in a fixed layer.

Examples:
layout.cpp.

void Gwidget::SetWindowMgr ( GwindowMgr * w ) [virtual]
 

Set the window manager of the widget

Reimplemented in Gwindow.

void Gwidget::Show ( ) [virtual]
 

Display the widget

Examples:
askyesno.cpp, button.cpp, clist.cpp, entry.cpp, hello.cpp, label.cpp, and layout.cpp.


Member Data Documentation

int Gwidget::Height
 

position of the widget.

int Gwidget::Width
 

position of the widget.

int Gwidget::X
 

position of the widget.

int Gwidget::Y
 

position of the widget.


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

Copyright © 2002 Thibaut Nicolas
Last modified  lun sep 23 23:41:26 EDT 2002