GTK-Mode FORM Objects - INTRODUCTION
Updated: Aug 31, 2008

HotBasic Linux provides two modes for $APPTYPE GUI:  GTK-mode (present default)
and X11-mode, invoked by use of the compiler -X switch or $X11 directive.

$APPTYPE GUI in GTK-Mode uses libgtk-x11-2.0.so.0 and libgobject-2.0.so.0
directly.

Several downloads such as hbgtkgui.zip show source code examples.  As GTK-Mode
further develops more demo downloads showing new features will be added, and
may provide the best tool to see working code syntax to construct your own
applications.

Users like AIR have demos showing alternate routes toward application writing.
E.g., glade's form designer may be used to produce an .xml file which can be
translated into HotBasic code.  AIR's demos also show numerous techniques, such
as manipulating fonts, which are not yet native.  Indeed, this is "normal".
Creative users marched ahead of HotBasic development in the Windows version for
GUI apps and the same can be expected for Linux, too. 

Form Object Comments:
~~~~~~~~~~~~~~~~~~~~
FORM
Unlike Windows, FORM .Height and .ClientHeight are equal and .Width and
.ClientWidth are equal.  In GTK-mode, adds read-only .Container property.
Write-only .BorderWidth of the container is another GTK-only container
property.
The $GTKFORM directive determines which container is used for subsequently
created FORM objects -- FIXED, HBOX or VBOX (default is FIXED).

BUTTON

CANVAS

CHECKBOX

COMBOBOX

DATETIME

EDIT

FILELISTBOX
Alias for LISTBOX

GAUGE

GRID

GROUPBOX

HBOX
Unique to GTK-mode, with .Spacing and .Homogeneous properties.  

HEADER

IMAGE
Unique to GTK-mode, .LoadFromFile can load a .bmp file into the IMAGE.

LABEL

LISTBOX
The .Parent property is the object's LISTVIEW (GtkScrolledWindow)
Vertical and horizontal scrollbars default to "automatic" and "never"
respectively. 

LISTVIEW
Vertical and horizontal scrollbars default to "automatic" and "never"
respectively. 

PANEL

RADIOBUTTON

RICHEDIT
The .Parent property is the object's LISTVIEW (GtkScrolledWindow)
Vertical and horizontal scrollbars default to "automatic" and "never"
respectively. 

RICHEDIT2
Unlike Windows, alias for RICHEDIT

SCROLLBAR
GTK-mode SCROLLBAR is horizontal only.

SPLASH

STATUSBAR

TABCONTROL

TOOLBAR

TRACKBAR

TREEVIEW

UPDOWN
In X11-mode, scrolls text list; in GTK-mode, behaves as a GtkAdjustment.

VBOX
Unique to GTK-mode, with .Spacing and .Homogeneous properties.


Constants
~~~~~~~~~
'HotBasic FORM object type offsets
'$DEFINE fExStyle 0  'used for FORM .Container handle in GTK-mode
$DEFINE fClass 4
$DEFINE fCaption 8
$DEFINE fStyle 12
$DEFINE fLeft 16
$DEFINE fTop 20
$DEFINE fWidth 24
$DEFINE fHeight 28
$DEFINE fParent 32
$DEFINE fID 36
$DEFINE fHandle 40
$DEFINE fIcon 44
$DEFINE fBmp 48
$DEFINE fFont 52
$DEFINE fStatus 56
$DEFINE fMenu 60
$DEFINE fColor 64
$DEFINE fTextColor 68

 
Copyright 2007-2008 James J Keene PhD
Original Publication: Nov 27, 2007
