wxXmlResource

wxXmlResource

wxXmlResource is the class used to load XML-based resource files.

The XML-based resource system, known as XRC, allows user interface elements such as dialogs, menu bars and toolbars, to be stored in text files and loaded into the application at run-time. XRC files can also be zipped into binary XRS files.

Once an XRC file is loaded, call either xrc_load_dialog or xrc_load_frame. This will load the form and all controls. Call xrc_get_control to create references to any controls execpt menus and tool bars.

For menus, use get_menu_bar to reference the menu bar and get_menu_by_label to reference a menu, find_menuitem_by_position to reference a menuitem, and either find_menuitem_id or or find_menuitem_by_position to retrieve a menuitem id. One of the issues with using menus is that IDs are not saved in the XRC file (even though some tools may lead you to think otherwise).

Functions/Procedures
Supertopics

wxXmlResource

[func]
xrc_get_control
( atom resource, atom parent, object name )

Category: wxXmlResource

Returns a reference to the given control name. Does not work for menus or toolbars. Use xrc_load_menu_bar, xrc_load_menu or xrc_load_tool_bar respectively.


wxXmlResource

[func]
xrc_get_xrcid
( atom resource, object name )

Category: wxXmlResource

Returns wxNOT_FOUND if not found.


wxXmlResource

[func]
xrc_load_bitmap
( atom resource, object name )

Category: wxXmlResource

Loads a bitmap resource from a file.


wxXmlResource

[func]
xrc_load_dialog
( atom resource, atom parent, object name )

Category: wxXmlResource

Loads the dialog form. parent can be 0.


wxXmlResource

[func]
xrc_load_frame
( atom resource, atom parent, object name )

Category: wxXmlResource

Loads the frame. parent should be 0 for main frame.


wxXmlResource

[func]
xrc_load_icon
( atom resource, object name )

Category: wxXmlResource


wxXmlResource

[func]
xrc_load_menu
( atom resource, object name )

Category: wxXmlResource

Loads menu from resource. Returns NULL on failure.


wxXmlResource

[func]
xrc_load_menu_bar
( atom resource, atom parent, object name )

Category: wxXmlResource

Loads a menubar from resource. Returns NULL on failure.


wxXmlResource

[func]
xrc_load_panel
( atom resource, atom parent, object name )

Category: wxXmlResource

Loads a panel. parent points to the parent window (if any). This form is used to finish creation of an already existing instance.


wxXmlResource

[func]
xrc_load_tool_bar
( atom resource, atom parent, object name )

Category: wxXmlResource

Loads a toolbar.