--- id: maxgui.maxgui title: MaxGUI.MaxGUI sidebar_label: MaxGUI.MaxGUI --- The MaxGUI module contains commands to create and control user interfaces for developing applications in BlitzMax. Users should be familiar with the [WaitEvent](../../brl/brl.eventqueue/#function-waitevent-int) command and BlitzMax events which provide the basic communication mechanism between user interface and program when developing MaxGUI applications.
| Constant | Description | Fall Back |
| GUICOLOR_WINDOWBG | Window/panel background color. | R: 240, G: 240, B: 240 |
| GUICOLOR_GADGETBG | Gadget background color (e.g. textfield). | R: 255, G: 255, B: 255 |
| GUICOLOR_GADGETFG | Gadget text color. | R: 0, G: 0, B: 0 |
| GUICOLOR_SELECTIONBG | Text selection background color. | R: 50, G: 150, B: 255 |
| GUICOLOR_LINKFG | Hyperlink text color. | R: 0, G: 0, B: 255 |
| Constant | Windows Fall-Back | Mac OS X Fall-Back | Linux Fall-Back | Description |
| GUIFONT_SYSTEM | MS Shell Dlg | Lucida Grande | FreeSerif | Default font used to draw gadgets by the OS. |
| GUIFONT_SERIF | Times New Roman | Times New Roman | FreeSerif | Serif font. |
| GUIFONT_SANSSERIF | Arial | Helvetica | FreeSans | Sans Serif font. |
| GUIFONT_SCRIPT | Comic Sans MS | Comic Sans MS | TSCu_Comic | Handwriting style font. |
| GUIFONT_MONOSPACED | Consolas/Courier New | Courier | Courier | Fixed width font typically used for coding. |
| Constant | Font Style |
| FONT_BOLD | Bold |
| FONT_ITALIC | Italic |
| FONT_UNDERLINE | Underlined |
| FONT_STRIKETHROUGH | *Strikethrough |
| Constant | Font Style |
| FONT_BOLD | Bold |
| FONT_ITALIC | Italic |
| FONT_UNDERLINE | Underlined |
| FONT_STRIKETHROUGH | *Strikethrough |
| Constant | Description |
| POINTER_DEFAULT | Default OS pointer. |
| POINTER_ARROW | Arrow pointer. |
| POINTER_IBEAM | Typically used when making text selections. |
| POINTER_WAIT | Hourglass animation. |
| POINTER_CROSS | Typically used for precise drawing. |
| POINTER_UPARROW | Typically used for selections. |
| POINTER_SIZENWSE | Typically used over sizing handles. |
| POINTER_SIZENESW | Typically used over sizing handles. |
| POINTER_SIZEWE | Typically used over sizing handles. |
| POINTER_SIZENS | Typically used over sizing handles. |
| POINTER_SIZEALL | Typically shown when moving an item. |
| POINTER_NO | Typically shown when an action is prohibited. |
| POINTER_HAND | Typically used for links. |
| POINTER_APPSTARTING | Usually shows a pointer and miniature hourglass animation. |
| POINTER_HELP | Usually shows an arrow pointer, with an adjacent question mark. |
| Constant | Corresponding Gadget Class |
| GADGET_DESKTOP | Desktop |
| GADGET_WINDOW | Window |
| GADGET_BUTTON | Button |
| GADGET_PANEL | Panel |
| GADGET_TEXTFIELD | TextField |
| GADGET_TEXTAREA | TextArea |
| GADGET_COMBOBOX | ComboBox |
| GADGET_LISTBOX | ListBox |
| GADGET_TOOLBAR | Toolbar |
| GADGET_TABBER | Tabber |
| GADGET_TREEVIEW | Treeview |
| GADGET_HTMLVIEW | HtmlView |
| GADGET_LABEL | Label |
| GADGET_SLIDER | Slider |
| GADGET_PROGBAR | Progress Bar |
| GADGET_MENUITEM | Menu |
| GADGET_NODE | Treeview Node |
| GADGET_CANVAS | Canvas Gadget |
| Constant | Description |
| EDGE_CENTERED | The edge of the gadget is kept a fixed distance from the center of its parent. |
| EDGE_ALIGNED | The edge of the gadget stays a fixed distance from its parent's corresponding edge. |
| EDGE_RELATIVE | The edge of the gadget remains a proportional distance from both of its parent's edges. |
| Event ID | Description |
| EVENT_MOUSEDOWN | Mouse button pressed. Event data contains mouse button code. |
| EVENT_MOUSEUP | Mouse button released. Event data contains mouse button code. |
| EVENT_MOUSEMOVE | Mouse moved. Event x and y contain mouse coordinates. |
| EVENT_MOUSEWHEEL | Mouse wheel spun. Event data contains delta clicks. |
| EVENT_MOUSEENTER | Mouse entered gadget area. |
| EVENT_MOUSELEAVE | Mouse left gadget area. |
| Event ID | Description |
| EVENT_KEYDOWN | Key pressed. Event data contains keycode. |
| EVENT_KEYUP | Key released. Event data contains keycode. |
| EVENT_KEYREPEAT | Key is being held down. Event data contains keycode. |
| Flag | Description |
| PANELPIXMAP_TILE | The panel is filled with repeating tiles. |
| PANELPIXMAP_CENTER | The pixmap is positioned at the center of the panel. |
| PANELPIXMAP_FIT | The pixmap is scaled proportionally to best fit the panel size. |
| PANELPIXMAP_FIT2 | A variant of PANELPIXMAP_FIT where clipping can occur to achieve a better fit. |
| PANELPIXMAP_STRETCH | The pixmap is stretched to fit the entire panel. |
| Flag | Description |
| GADGETPIXMAP_ICON | Places an icon-sized pixmap onto a push-button/menu. |
| GADGETPIXMAP_NOTEXT | Removes text on buttons when used in conjunction with GADGETPIXMAP_ICON. |
| Event ID | Description |
| EVENT_KEYDOWN | Key pressed. Event data contains keycode. |
| EVENT_KEYCHAR | Key character. Event data contains unicode value. |
| Style | Meaning |
| WINDOW_TITLEBAR | The Window has a titlebar that displays the titletext$. |
| WINDOW_RESIZABLE | The Window can be resized by the user. |
| WINDOW_MENU | The Window has an associated window menu (retrieve menu handle using [WindowMenu](../../maxgui/maxgui.maxgui/#function-windowmenu-tgadget-window-tgadget)). |
| WINDOW_STATUS | The Window has a statusbar. |
| WINDOW_TOOL | A window style commonly used for toolbars and other tool windows. |
| WINDOW_CLIENTCOORDS | The dimensions specified relate to the client area as opposed to the window frame. |
| WINDOW_CENTER | The x and y parameters are ignored, and the Window is positioned either in the middle of the screen or the middle of the parent gadget. |
| WINDOW_HIDDEN | The Window is created in a hidden state and can be revealed later using [ShowGadget](../../maxgui/maxgui.maxgui/#function-showgadget-gadget-tgadget). |
| WINDOW_ACCEPTFILES | Enable file drag and drop operations (emits the EVENT_WINDOWACCEPT events). |
| Event ID | Description |
| EVENT_WINDOWMOVE | Window has been moved. |
| EVENT_WINDOWSIZE | Window has been resized. |
| EVENT_WINDOWCLOSE | Window close icon clicked. |
| EVENT_WINDOWACTIVATE | Window has been activated. |
| EVENT_WINDOWACCEPT | A file was dropped onto a Window with the WINDOW_ACCEPTFILES style. The event Extra object holds the filepath. |
| Style | Meaning |
| BUTTON_PUSH | Standard push button. |
| BUTTON_CHECKBOX | A check box button that displays a tick when its state is [True](../../brl/brl.blitz/#true). |
| BUTTON_RADIO | A radio button is accompanied by a small circular indicator, filled when its state is [True](../../brl/brl.blitz/#true). |
| BUTTON_OK | Standard push button that is also activated when the user presses the RETURN key. |
| BUTTON_CANCEL | Standard push button that is also activated when the user presses the ESCAPE key. |
| Style | Meaning |
| PANEL_SUNKEN | Panel is drawn with a sunken border (or just a simple border on OS X). |
| PANEL_RAISED | Panel is drawn with a raised border (or just a simple border on OS X). |
| PANEL_GROUP | Panel is drawn with a titled etched border. |
| Event ID | Description |
| EVENT_MOUSEDOWN | Mouse button pressed. Event data contains mouse button code. |
| EVENT_MOUSEUP | Mouse button released. Event data contains mouse button code. |
| EVENT_MOUSEMOVE | Mouse moved. Event x and y contain mouse coordinates. |
| EVENT_MOUSEWHEEL | Mouse wheel spun. Event data contains delta clicks. |
| EVENT_MOUSEENTER | Mouse entered gadget area. |
| EVENT_MOUSELEAVE | Mouse left gadget area. |
| EVENT_KEYDOWN | Key pressed. Event data contains keycode. |
| EVENT_KEYUP | Key released. Event data contains keycode. |
| EVENT_KEYCHAR | Key character. Event data contains unicode value. |
| Flags | Description |
| PANELPIXMAP_TILE | The panel is filled with repeating tiles. |
| PANELPIXMAP_CENTER | The pixmap is positioned at the center of the panel. |
| PANELPIXMAP_FIT | The pixmap is scaled to best fit the panel size. |
| PANELPIXMAP_FIT2 | A variant of PANELPIXMAP_FIT where clipping can occur to achieve a better fit. |
| PANELPIXMAP_STRETCH | The pixmap is stretched to fit the entire panel. |
| Flags | Description |
| TEXTFIELD_PASSWORD | Masks characters being typed as a string as asterisks. |
| Event ID | Description |
| EVENT_GADGETACTION | The user has edited the text in the TextField. |
| Style | Meaning |
| TEXTAREA_WORDWRAP | Long lines of text 'wrap round' onto the next lines. |
| TEXTAREA_READONLY | The text cannot be edited by the user. |
| Event ID | Description |
| EVENT_GADGETACTION | The user has modified the text in a TextArea. |
| EVENT_GADGETSELECT | The text-cursor has moved or a selection of text is made by the user. |
| EVENT_GADGETMENU | The user has right-clicked somewhere in the TextArea. |
| Constant | Meaning |
| TEXTFORMAT_BOLD | Bold |
| TEXTFORMAT_ITALIC | Italic |
| TEXTFORMAT_UNDERLINE | Underline |
| TEXTFORMAT_STRIKETHROUGH | StrikeThrough |
| Style | Meaning |
| COMBOBOX_EDITABLE | Allows the ComboBox to behave similar to a TextField, by allowing typed user input also. |
| Event ID | Description |
| EVENT_GADGETACTION | The selection has been cleared, or the text has changed. |
| Event ID | Description |
| EVENT_GADGETSELECT | An item has been selected, or the selection has been cleared. |
| EVENT_GADGETACTION | An item has been double-clicked. |
| EVENT_GADGETMENU | The user has right-clicked somewhere in the listbox. |
| Event ID | Description |
| EVENT_GADGETACTION | A new tab has been selected. Event data contains the tab index. |
| EVENT_GADGETMENU | A tab has been right-clicked. Event data contains the tab index. |
| Flag | Meaning |
| GADGETITEM_NORMAL | A plain gadget item. |
| GADGETITEM_DEFAULT | The item defaults to a selected state. |
| GADGETITEM_TOGGLE | The item alternates between selected states when pressed. |
| GADGETITEM_LOCALIZED | The item text and tooltip are localization strings. |
| Event ID | Description |
| EVENT_GADGETACTION | A toolbar item has been selected/clicked. Event data contains the item index. |
| Event ID | Description |
| EVENT_GADGETSELECT | The user has selected a node. |
| EVENT_GADGETACTION | The user has double-clicked a node. |
| EVENT_GADGETOPEN | The user has expanded a node, revealing its children. |
| EVENT_GADGETCLOSE | The user has collapsed a node, hiding its children. |
| EVENT_GADGETMENU | The user has right-clicked somewhere in the TreeView. |
| Style | Meaning |
| HTMLVIEW_NOCONTEXTMENU | The webpage's default context menu is disabled. |
| HTMLVIEW_NONAVIGATE | User navigation is disabled and EVENT_GADGETACTION is generated instead. |
| Event ID | Description |
| EVENT_GADGETDONE | Generated when a webpage has finished loading or a page anchor has been scrolled to. |
| EVENT_GADGETACTION | Generated when a user clicks a link. Event Text contains the requested URL. |
| Style | Meaning |
| LABEL_FRAME | The label has a simple border. |
| LABEL_SUNKENFRAME | The label has a sunken border. |
| LABEL_SEPARATOR | The label is an etched box with no text useful for drawing separators. |
| LABEL_LEFT | The label's text is left-aligned. This is the default. |
| LABEL_CENTER | The label's text is center-aligned. |
| LABEL_RIGHT | The label's text is right-aligned. |
| Style | Meaning |
| SLIDER_HORIZONTAL | The slider is moved left and right. |
| SLIDER_VERTICAL | The slider is moved up and down. |
| SLIDER_SCROLLBAR | The slider uses a proportional size knob. |
| SLIDER_TRACKBAR | The slider uses a fixed size knob. |
| SLIDER_STEPPER | The slider has no knob, just arrow buttons. |
| Event ID | Description |
| EVENT_GADGETACTION | The user has changed the slider's value. Event Data contains the SliderValue. |
| Event ID | Description |
| EVENT_MOUSEDOWN | Mouse button pressed. Event data contains mouse button code. |
| EVENT_MOUSEUP | Mouse button released. Event data contains mouse button code. |
| EVENT_MOUSEMOVE | Mouse moved. Event x and y contain mouse coordinates. |
| EVENT_MOUSEWHEEL | Mouse wheel spun. Event data contains delta clicks. |
| EVENT_MOUSEENTER | Mouse entered gadget area. |
| EVENT_MOUSELEAVE | Mouse left gadget area. |
| EVENT_KEYDOWN | Key pressed. Event data contains keycode. |
| EVENT_KEYUP | Key released. Event data contains keycode. |
| EVENT_KEYCHAR | Key character. Event data contains unicode value. |
| Constant | Return Value |
| QUERY_HWND | A Windows API HWND handle. |
| QUERY_HWND_CLIENT | A Windows API HWND handle representing a gadget's client area. |
| QUERY_NSVIEW | A Cocoa NSView handle. |
| QUERY_NSVIEW_CLIENT | A Cocoa NSView representing a gadget's client area. |
| QUERY_FLWIDGET | An FL_WIDGET handle. |
| QUERY_FLWIDGET_CLIENT | An FL_WIDGET handle representing a gadget's client area. |