| BaH.GTKMaxGUI: | Functions | Types | Modinfo | Source |
| Function GetScreenPointerPos(x:Int Var, y:Int Var) | |
| Description | Returns pointer coordinates relative to the screen. |
| Function GetWindowPointerPos(window:TGadget, x:Int Var, y:Int Var) | |
| Description | Returns pointer coordinates relative to window. |
| Function SetAppIcon(pix:TPixmap) | |
| Description | Sets the application icon. |
| Information | Note: Until BRL add app icon functionality, consider this function API volatile. |
| Function SetButtonPixmap(gadget:TGadget, pixmap:TPixmap) | |
| Description | Sets the button image using the specified pixmap. |
| Information | Note: Until BRL add button image functionality, consider this function API volatile. |
| Function SetGadgetToolTip(gadget:TGadget, tip:String) | |
| Description | Sets the tooltip text for the gadget. |
| Information | Note: Until BRL add gadget tooltip functionality, consider this function API volatile.
Parameters:
|
| Type TGTKButton Extends TGTKGadget | |
| Description | Base type for button gadgets. |
| Method GetText:String() | |
| Description | Returns the button text. |
| Method SetHotKey(keycode:Int, modifier:Int) | |
| Description | Sets a hot key for the button. |
| Method SetText(text:String) | |
| Description | Sets the button text. |
| Method SetTextColor(r:Int, g:Int, b:Int) | |
| Description | Sets the button text color. |
| Function OnButtonClicked(widget:Byte Ptr, obj:Object) | |
| Description | Callback for button click. |
| Type TGTKButtonCheckbox Extends TGTKToggleButton | |
| Description | A checkbox button. |
| Type TGTKButtonPush Extends TGTKButton | |
| Description | A push button. |
| Type TGTKButtonRadio Extends TGTKToggleButton | |
| Description | A radio button. |
| Type TGTKCanvas Extends TGTKGadget | |
| Description | A canvas. |
| Function OnMouseMove:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse movement. |
| Type TGTKComboBox Extends TGTKList | |
| Description | A combo box. |
| Function OnSelectionChanged(widget:Byte Ptr, obj:Object) | |
| Description | Callback for selection change. |
| Type TGTKContainer Extends TGTKGadget | |
| Description | This type handles "internal" widget containers for "Container" gadgets. |
| Type TGTKDesktop Extends TGTKGadget | |
| Description | The Desktop. |
| Method ClientHeight:Int() | |
| Description | Returns the desktop height. |
| Method ClientWidth:Int() | |
| Description | Returns the desktop width. |
| Type TGTKEditable Extends TGTKGadget | |
| Description | Base type for editable gadgets (textfield / textarea). |
| Type TGTKGadget Extends TGadget | |
| Description | The base for all TGTK gadgets. |
| Method Activate(cmd:Int) | |
| Description | Perform an activation command on the gadget. |
| Method ClientHeight:Int() | |
| Description | Return the gadget's client height. |
| Method ClientWidth:Int() | |
| Description | Return the gadget's client width. |
| Method GetGadgetVisual:Byte Ptr() | |
| Description | Returns the pointer to the largest encompasing part of the gadget, usually the handle. |
| Method SetColor(r:Int, g:Int, b:Int) | |
| Description | Sets the gadget color. |
| Method SetEnabled(bool:Int) | |
| Description | Enable or disable the gadget. |
| Method SetFont(font:TGuiFont) | |
| Description | Sets the gadget font. |
| Method SetShow(truefalse:Int) | |
| Description | Show or hide the gadget. |
| Method SetTextColor(r:Int, g:Int, b:Int) | |
| Description | Sets the gadget text color. |
| Method setToolTip(tip:String) | |
| Description | Set the gadget tooltip. |
| Method State:Int() | |
| Description | Return the gadget state. |
| Function OnFocusLost:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for focus lost. |
| Type TGTKHTMLView Extends TGTKGadget | |
| Description | A base type for html view gadgets. |
| Information | Implementations are in seperate modules. See bah.gtkwebmozilla and bah.gtkwebgtkhtml mods. |
| Type TGTKLabel Extends TGTKGadget | |
| Description | A label. |
| Method SetShow(truefalse:Int) | |
| Description | Show or Hide the label. |
| Method SetTextColor(r:Int, g:Int, b:Int) | |
| Description | Sets the label text color. |
| Function OnMouseDown:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse button press. |
| Type TGTKList Extends TGTKGadget | |
| Description | A base for list gadgets. |
| Type TGTKListbox Extends TGTKListWithScrollWindow | |
| Description | List box. |
| Method RemoveListItem(index:Int) | |
| Description | Removes an item from the list at the given index. |
| Function OnRowActivated(widget:Byte Ptr, treePath:Byte Ptr, treeviewColumn:Byte Ptr, obj:Object) | |
| Description | Callback for listbox activation (double-click). |
| Type TGTKListWithScrollWindow Extends TGTKList | |
| Description | A scrollable list. |
| Type TGTKMenuItem Extends TGTKGadget | |
| Description | A menu item. |
| Method GetText:String() | |
| Description | Returns the menu text. |
| Method SetText(label:String) | |
| Description | Sets the menu text. |
| Method State:Int() | |
| Description | Returns menu state - checked or unchecked. |
| Function MenuSelected:Int(widget:Byte Ptr, obj:Object) | |
| Description | Callback function for selecting a menu option. |
| Information | Triggers a menu action event. NOTE - We have to ignore "obj" because it is not reliable. |
| Type TGTKPanel Extends TGTKContainer | |
| Description | A Panel. |
| Method SetColor(r:Int, g:Int, b:Int) | |
| Description | Set the panel color. |
| Method SetPixmap(pixmap:TPixmap, flags:Int) | |
| Description | Set the panel pixmap. |
| Method SetShow(truefalse:Int) | |
| Description | Shows or hides a panel. |
| Method SetText(text:String) | |
| Description | Sets the text of a group panel. |
| Function OnKeyDown:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for key down. |
| Function OnKeyUp:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for key up. |
| Function OnMouseDown:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse button press. |
| Function OnMouseEnter:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse enter. |
| Function OnMouseLeave:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse leave. |
| Function OnMouseMove:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse movement. |
| Function OnMouseUp:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse button release. |
| Function OnScroll(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse scroll wheel. |
| Type TGTKProgressBar Extends TGTKGadget | |
| Description | A progress bar. |
| Information | Interestingly, although we can find out the current value, MaxGUI doesn't support it... |
| Method GetValue:Float() | |
| Description | Get the current value of the progress bar. |
| Method SetValue(value:Float) | |
| Description | Set the value of the progress bar. |
| Type TGTKRange Extends TGTKGadget | |
| Description | A base-type for handling slider / range gadgets - ScrollBar and TrackBar. |
| Method GetProp:Int() | |
| Description | Returns the current slider value. |
| Method SetProp(value:Int) | |
| Description | Sets the value on the slider. |
| Information | Seem to have to add 1 to the value for some reason... |
| Method SetRange(visible:Int, total:Int) | |
| Description | Sets the slider range. |
| Function OnChangeValue:Int(widget:Byte Ptr, scrolltype:Int, value:Double, obj:Object) | |
| Description | Callback for user changing of a slider. |
| Information | Tries to keep the value within the desired range. |
| Type TGTKScrollBar Extends TGTKRange | |
| Description | A scrollbar. |
| Method SetRange(visible:Int, total:Int) | |
| Description | Overrides the default... |
| Information | instead of this being the actual range, the min is always 0 and total defines the max. visible defines the step size. |
| Type TGTKStepper Extends TGTKRange | |
| Description | a Stepper. |
| Type TGTKTabber Extends TGTKContainer | |
| Description | A tabber. |
| Method InsertListItem(index:Int, text:String, tip:String, icon:Int, tag:Object) | |
| Description | Inserts a a new tab. |
| Type TGTKTextArea Extends TGTKEditable | |
| Description | A text area. |
| Method AddText(text:String) | |
| Description | Adds text to the end of the text. |
| Method AreaLen:Int(units:Int) | |
| Description | Returns either the number of characters or number of rows. |
| Method AreaText:String(pos:Int, length:Int, units:Int) | |
| Description | Returns the text for the specified location. |
| Method GetCursorPos:Int(units:Int) | |
| Description | Returns the current cursor position value, in characters or lines. |
| Method GetSelectionLength:Int(units:Int) | |
| Description | Returns the size of the current selection, in characters or lines. |
| Method LockText() | |
| Description | Locks the text area. |
| Method setFastUpdate(bool:Int) | |
| Description | Enable to allow *fast* formatting. |
| Information | When enabled, highlighting will not be removed before being applied, and since tags are ordered, some highlight may not appear on top of others. |
| Method SetFont(font:TGuiFont) | |
| Description | Set the text area font. |
| Method SetSelection(pos:Int, length:Int, units:Int) | |
| Description | Set the text area selection. |
| Method SetShow(truefalse:Int) | |
| Description | Set the text area visibility. |
| Method SetStyle(r:Int, g:Int, b:Int, flags:Int, pos:Int, length:Int, units:Int) | |
| Description | Sets the style of part of the text area. |
| Information | flags are any mix of TEXTFORMAT_BOLD, TEXTFORMAT_ITALIC, TEXTFORMAT_UNDERLINE and TEXTFORMAT_STRIKETHROUGH. We utilise the buffers' tag table to cache tags that we reuse - based on the attributes. This way we only create one for each different style we actually use in the buffer. Note: "fastUpdate" flag enables or disables the use of gtk_text_buffer_remove_all_tags which strips old tags from the area before applying the new one. Ideally, you would first remove tags before applying new ones, but since removal is slow, the following method can work well : setFastUpdate(false) SetStyle on whole intended area to "normal" style setFastUpdate(true) iterate thru tokens applying styles.. |
| Method SetTabs(tabs:Int) |
| Method SetText(text:String) | |
| Description | Sets the text buffer text. |
| Method UnlockText() | |
| Description | Unlocks the text area. |
| Function OnCursorMoved(widget:Byte Ptr, _Step:Int, count:Int, extend_selection:Int, obj:Object) | |
| Description | Callback for text-cursor movement. |
| Function OnMouseDown:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse button press. |
| Function OnMouseUp:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse button release. |
| Function OnTextChanged(widget:Byte Ptr, obj:Object) | |
| Description | Callback for text change. |
| Type TGTKTextField Extends TGTKEditable | |
| Description | A Text field. |
| Method GetText:String() | |
| Description | Returns the textfield text. |
| Method SetText(txt:String) | |
| Description | Sets the textfield text. |
| Type TGTKToggleButton Extends TGTKButton | |
| Description | A button which has a toggle-type usage (radio / checkbox) |
| Function OnButtonClicked(widget:Byte Ptr, obj:Object) | |
| Description | Callback for button click. |
| Type TGTKToolbar Extends TGTKGadget | |
| Description | A Toolbar. |
| Method InsertListItem(index:Int, text:String, tip:String, icon:Int, extra:Object) | |
| Description | Inserts an item at the specified index. |
| Type TGTKTrackBar Extends TGTKRange | |
| Description | A trackbar. |
| Type TGTKTreeView Extends TGTKTreeViewNode | |
| Description | A tree view. |
| Function OnMouseDown:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for mouse right-click. |
| Function OnRowActivated(widget:Byte Ptr, treePath:Byte Ptr, treeviewColumn:Byte Ptr, obj:Object) | |
| Description | Callback for tree-view node activation (double-click). |
| Function OnRowCollapsed(widget:Byte Ptr, treeIter:Byte Ptr, treePath:Byte Ptr, obj:Object) | |
| Description | Callback for tree-view node collapse. |
| Function OnRowExpanded(widget:Byte Ptr, treeIter:Byte Ptr, treePath:Byte Ptr, obj:Object) | |
| Description | Callback for tree-view node expand. |
| Type TGTKTreeViewNode Extends TGTKListWithScrollWindow | |
| Description | A node in the tree view. |
| Method CountKids:Int() | |
| Description | Returns the number of child nodes. |
| Method GetText:String() | |
| Description | Returns the text for this node. |
| Method InsertNode:TGadget(index:Int, text:String, icon:Int) | |
| Description | Inserts a new node as a child at the specified index. |
| Method ModifyNode(text:String, icon:Int) | |
| Description | Changes the tree node text and icon. |
| Method RootNode:TGadget() | |
| Description | Returns the root node for this tree. |
| Method SelectedNode:TGadget() | |
| Description | Returns the currently selected tree node or null if none selected. |
| Method SetText(text:String) | |
| Description | Sets the text for this node. |
| Type TGTKWindow Extends TGTKContainer | |
| Description | A Window. |
| Method PopupMenu(menu:TGadget,extra:Object=Null) | |
| Description | Pop up a popup menu. |
| Method setIcon(pix:TPixmap) | |
| Description | Sets the window icon with the specified pixmap. |
| Method SetStatus(text:String) | |
| Description | Set the window status text. |
| Method State:Int() | |
| Description | Returns the window state. |
| Function OnWindowActivate(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for window activate. |
| Function OnWindowClose:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for window close. |
| Function OnWindowDeactivate:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for window deactivate. |
| Information | Not used, but might come in handy at some point... |
| Function OnWindowMoveSize(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for window size / move. |
| Function OnWindowSize(widget:Byte Ptr, obj:Object) | |
| Description | Callback for window size. |
| Information | This event doesn't actually trigger a max size event, but we use it to adjust the client size. |
| Function OnWindowStateChange:Int(widget:Byte Ptr, event:Byte Ptr, obj:Object) | |
| Description | Callback for window state change. |
| Version | 1.18 |
|---|---|
| Author | Bruce A Henderson |
| License | Blitz Shared Source Code |
| Copyright | 2006, 2007 Bruce A Henderson |
| Modserver | BRL |
| History | 1.18 |
| History | Fixed generation of GADGETSELECT on TreeView creation. |
| History | Fixed loss of next text change event after setting empty text field to empty. |
| History | 1.17 |
| History | Added FormatTextAreaBackground support. |
| History | 1.16 |
| History | Added visible field to TGTKGadget to control generation of events. |
| History | 1.15 |
| History | UTF-8 fix for RequestFile filters and RequestDir path. |
| History | Added text attribute with GetText and SetText methods to TreeNode. |
| History | 1.14 |
| History | Fixed non-resizable window resizing problem with menus and statusbar changes. |
| History | Fixed ComboBox not clearing items. |
| History | Rewrite of UTF-8 handling... *sigh* |
| History | Fixed UTF-8 issues with Notify, Confirm, Proceed, RequestFile and RequestDir. |
| History | 1.13 |
| History | New popupmenu functionality. |
| History | Added EVENT_MOUSEWHEEL events for canvas and active panels. |
| History | Added EVENT_KEYDOWN and EVENT_KEYUP events for active panels. |
| History | Added EVENT_KEYCHAR events for canvas and active panels. |
| History | Added EVENT_KEYREPEAT for Canvas and active panels. |
| History | Fixed canvas mouse up not reporting button data. |
| History | Fixed canvas generating double ACTIVATE_REDRAWs. |
| History | Fixed some key mappings. |
| History | Fixed PANELPIXMAP_TILE not resetting to 0,0. |
| History | Fixed panel redraw event handling. |
| History | 1.12 |
| History | Added mouse Down/Menu events for label. |
| History | Added Enter/Leave events for buttons. |
| History | Removed requester leaks. Code clean-up. |
| History | Added SetButtonPixmap function. |
| History | Panel now raises GADGETPAINT event when repaint required. |
| History | Gadget ACTIVATE_REDRAW now raises GADGETPAINT event. |
| History | 1.11 |
| History | Fixed listbox generating selection event on initialisation. |
| History | 1.10 |
| History | Fixes ActiveGadget crash if no active widget on a window. |
| History | Added Enter/Leave events for labels. |
| History | Fixed text color setting for labels and buttons. |
| History | Added GTK_USE_STOCK_ITEMS global int. Enabled by default. Set it to False to disable on-the-fly conversion of gadgets showing stock-items (image/text/shortcut) |
| History | Fixed statusbar disappearing with no text. |
| History | 1.09 |
| History | i18n enhancement - GTKTextArea.areaText and gadgets GetText now return ISO8859 strings. |
| History | 1.08 |
| History | Split out HTML views into separate modules - see bah.gtkwebgtkhtml and bah.gtkwebmozilla. |
| History | Fixed double-ampersand text displaying. |
| History | Improved WINDOW_CLIENTCOORDS handling. |
| History | Improved gadget positioning - no negative coords!. |
| History | EVENT_MOUSEMOVE on panel/canvas now contain button-pressed value. |
| History | Improved gadgeted freeing. |
| History | 1.07 |
| History | Fixed framed panel height. Was too high. |
| History | HTMLView now uses gtkmozembed. |
| History | 1.06 |
| History | Removed statusbar handle - theme issues. |
| History | Improved button state handling. |
| History | OpenURL now calls native-driver openurl. |
| History | Added panel pixmap TILE support. |
| History | Panel pixmaps can now be cleared. |
| History | Removed libgnomecanvas dependency. |
| History | Stepper now uses pixbuf to draw onto buttons. |
| History | Added menu (EVENT_GADGETMENU) support to buttons and textfield. |
| History | 1.05 |
| History | Fixed radiobutton problem with groups of more than two buttons. |
| History | SetHotKey now working for buttons. |
| History | Window statusbar text now supports three positions based on tabs. |
| History | 1.04 |
| History | *Engine Rewrite* - Now uses GtkLayout instead of gnomecanvas. Fixes a LOT of rendering anomolies. Should also be faster. |
| History | Changed tabber redrawing back. |
| History | Fixed check-menu issues with mnemonics and checking a menu initially with UncheckMenu. |
| History | Fixed group panel not setting text on create. |
| History | 1.03 |
| History | Fixed textfield SetText raising event. |
| History | Added mnemonic functionality for buttons. |
| History | Tweaked window client width/height to work on certain window types. Also takes into account status/menu heights on initial client height testing. |
| History | Fixed crash on app end after freeing canvas. |
| History | Fixed label SetText visuals. |
| History | 1.02 |
| History | Added panel pixmaps : currently only FIT, STRETCH and CENTER are working. |
| History | Fixed some issues with SetGadgetShape on a window. Now attempts to ignore SetShape-driven events. |
| History | 1.01 |
| History | Enabled child/parent window relationships with WINDOW_CHILD. |
| History | Fixed listbox left-click to raise SELECT event. Added listbox double-click ACTION event. |
| History | Added list/tree right-click MENU events. |
| History | Fixed tabber redrawing frenzy - hopefully. |
| History | More panel layout tweaking. |
| History | 1.00 |
| History | Added label, textarea, progressbar tooltip support. |
| History | Added progressbar GetValue(). |
| History | Changed combobox to extend TGTKList. Added combobox icon support. |
| History | Fixed combobox missing 'extra' data. |
| History | Fixed treeview Free() crash. |
| History | Tweaked menu SetSelected to work in a more 'Max' way... |
| History | Keymapping improvements. |
| History | Implemented ACTIVATE_REDRAW, SelectTreeViewNode(). |
| History | Default F10 accel remapped to alt-F10 if app requires F10 hot key. |
| History | Modified window/panel layout code based on source from Simon Armstrong. |
| History | Added TEXTFORMAT_UNDERLINE and TEXTFORMAT_STRIKETHROUGH. |
| History | Added lost-focus handling - only enabled for textfield and textarea for now. |
| History | Added SetText, GetText methods. |
| History | Implemented UTF8/unicode string handling. |
| History | Added working stepper. It works, but it ain't nice... |
| History | 0.99 |
| History | Improved textarea SetStyle speed - added setFastUpdate() method. |
| History | HTMLView fixes. NONAVIGATE now *correctly* raises event on link-click. |
| History | Added Window maximize/minimize state awareness, and Window restore. |
| History | Added WINDOW_TOOL functionality. |
| History | Added window setIcon() method. |
| History | Enabled EVENT_WINDOWACTIVATE. Added x,y,w,h to window size / move events. Enabled ActivateWindow(). |
| History | Added SetGadgetToolTip() function. |
| History | Fixed Tabber visual issues. Added Tabber icon support. |
| History | 0.98 |
| History | Fixed Panel position bug. |
| History | Fixed menu SetText issue. |
| History | Changed window sizing/positioning *again*. Still not entirely happy with it. |
| History | 0.97 |
| History | Tabber now supports tooltips. Tabber will show scroller if too many tabs. |
| History | TextField (pressing return) can now activate Default Gadget. |
| History | Added SetPointer(). |
| History | Fixed excessive window SIZE events. |
| History | Fixed List missing 'extra' data. |
| History | Fixed some Gadget freeing issues. |
| History | 0.96 |
| History | Changed order of generated textarea change events - SELECT before ACTION. |
| History | 0.95 |
| History | Added key-filtering. |
| History | 0.94 |
| History | TGTKButtonCheckBox now extends TGTKToggleButton like it was meant to. SetSelected now works for it :-p |
| History | Textarea background color now setable. Textarea SetStyle now creates tags on the fly - rather than caching them - dunno if this will be a memory issue. |
| History | 0.93 |
| History | Fixed textarea clipboard actions. Fixed textarea setText. Fixed RequestFile save button text. Fixed font size issues. Fixed Tab sizing. |
| History | 0.92 |
| History | Added Canvas. Canvas key-down is repeating for now. Fixed some gadget Free() stuff. |
| History | 0.91 |
| History | Added radio buttons, popup menus, textarea improvements, tree node expand / collapse... etc |
| History | 0.90 |
| History | Very Alpha preview... Lots of things work, lots of things don't! |