.TH wxXmlResource 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxXmlResource \- Functions for wxXmlResource class .SH DESCRIPTION .LP This is the main class for interacting with the XML-based resource system\&. .LP The class holds XML resources from one or more \&.xml files, binary files or zip archive files\&. .LP Note that this is a singleton class and you\&'ll never allocate/deallocate it\&. Just use the static \fIget/0\fR\& getter\&. .LP See: Overview xrc, Overview xrcformat .LP wxWidgets docs: wxXmlResource .SH DATA TYPES .nf \fBwxXmlResource()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxXmlResource() .br .fi .br .LP .nf .B new(Options :: [Option]) -> wxXmlResource() .br .fi .br .RS .LP Types: .RS 3 Option = {flags, integer()} | {domain, unicode:chardata()} .br .RE .RE .RS .LP Constructor\&. .RE .LP .nf .B new(Filemask, Options :: [Option]) -> wxXmlResource() .br .fi .br .RS .LP Types: .RS 3 Filemask = unicode:chardata() .br Option = {flags, integer()} | {domain, unicode:chardata()} .br .RE .RE .RS .LP Constructor\&. .RE .LP .nf .B destroy(This :: wxXmlResource()) -> ok .br .fi .br .RS .LP Destructor\&. .RE .LP .nf .B attachUnknownControl(This, Name, Control) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br Control = wxWindow:wxWindow() .br .RE .RE .LP .nf .B attachUnknownControl(This, Name, Control, Options :: [Option]) -> .B boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br Control = wxWindow:wxWindow() .br Option = {parent, wxWindow:wxWindow()} .br .RE .RE .RS .LP Attaches an unknown control to the given panel/window/dialog\&. .LP Unknown controls are used in conjunction with \&. .RE .LP .nf .B clearHandlers(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br .RE .RE .RS .LP Removes all handlers and deletes them (this means that any handlers added using \fIAddHandler()\fR\& (not implemented in wx) must be allocated on the heap)\&. .RE .LP .nf .B compareVersion(This, Major, Minor, Release, Revision) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Major = Minor = Release = Revision = integer() .br .RE .RE .RS .LP Compares the XRC version to the argument\&. .LP Returns -1 if the XRC version is less than the argument, +1 if greater, and 0 if they are equal\&. .RE .LP .nf .B get() -> wxXmlResource() .br .fi .br .RS .LP Gets the global resources object or creates one if none exists\&. .RE .LP .nf .B getFlags(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br .RE .RE .RS .LP Returns flags, which may be a bitlist of ?wxXmlResourceFlags enumeration values\&. .RE .LP .nf .B getVersion(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br .RE .RE .RS .LP Returns version information (a\&.b\&.c\&.d = d + 256*c + 2562*b + 2563*a)\&. .RE .LP .nf .B getXRCID(Str_id) -> integer() .br .fi .br .RS .LP Types: .RS 3 Str_id = unicode:chardata() .br .RE .RE .LP .nf .B getXRCID(Str_id, Options :: [Option]) -> integer() .br .fi .br .RS .LP Types: .RS 3 Str_id = unicode:chardata() .br Option = {value_if_not_found, integer()} .br .RE .RE .RS .LP Returns a numeric ID that is equivalent to the string ID used in an XML resource\&. .LP If an unknown \fIstr_id\fR\& is requested (i\&.e\&. other than wxID_XXX or integer), a new record is created which associates the given string with a number\&. .LP If \fIvalue_if_not_found\fR\& is \fIwxID_NONE\fR\&, the number is obtained via \fIwx_misc:newId/0\fR\&\&. Otherwise \fIvalue_if_not_found\fR\& is used\&. .LP Macro \fIXRCID(name)\fR\& is provided for convenient use in event tables\&. .LP Note: IDs returned by XRCID() cannot be used with the \fIEVT_*_RANGE\fR\& macros, because the order in which they are assigned to symbolic \fIname\fR\& values is not guaranteed\&. .RE .LP .nf .B initAllHandlers(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br .RE .RE .RS .LP Initializes handlers for all supported controls/windows\&. .LP This will make the executable quite big because it forces linking against most of the wxWidgets library\&. .RE .LP .nf .B load(This, Filemask) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Filemask = unicode:chardata() .br .RE .RE .RS .LP Loads resources from XML files that match given filemask\&. .LP Example: .LP Note: If wxUSE_FILESYS is enabled, this method understands \fIwxFileSystem\fR\& (not implemented in wx) URLs (see \fIwxFileSystem::FindFirst()\fR\& (not implemented in wx))\&. .LP Note: If you are sure that the argument is name of single XRC file (rather than an URL or a wildcard), use \fILoadFile()\fR\& (not implemented in wx) instead\&. .LP See: \fILoadFile()\fR\& (not implemented in wx), \fILoadAllFiles()\fR\& (not implemented in wx) .RE .LP .nf .B loadBitmap(This, Name) -> wxBitmap:wxBitmap() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a bitmap resource from a file\&. .RE .LP .nf .B loadDialog(This, Parent, Name) -> wxDialog:wxDialog() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a dialog\&. .LP \fIparent\fR\& points to parent window (if any)\&. .RE .LP .nf .B loadDialog(This, Dlg, Parent, Name) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Dlg = wxDialog:wxDialog() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a dialog\&. .LP \fIparent\fR\& points to parent window (if any)\&. .LP This form is used to finish creation of an already existing instance (the main reason for this is that you may want to use derived class with a new event table)\&. Example: .RE .LP .nf .B loadFrame(This, Parent, Name) -> wxFrame:wxFrame() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a frame from the resource\&. .LP \fIparent\fR\& points to parent window (if any)\&. .RE .LP .nf .B loadFrame(This, Frame, Parent, Name) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Frame = wxFrame:wxFrame() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads the contents of a frame onto an existing \fIwxFrame\fR\&\&. .LP This form is used to finish creation of an already existing instance (the main reason for this is that you may want to use derived class with a new event table)\&. .RE .LP .nf .B loadIcon(This, Name) -> wxIcon:wxIcon() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads an icon resource from a file\&. .RE .LP .nf .B loadMenu(This, Name) -> wxMenu:wxMenu() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads menu from resource\&. .LP Returns NULL on failure\&. .RE .LP .nf .B loadMenuBar(This, Name) -> wxMenuBar:wxMenuBar() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Name = unicode:chardata() .br .RE .RE .RS .RE .LP .nf .B loadMenuBar(This, Parent, Name) -> wxMenuBar:wxMenuBar() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a menubar from resource\&. .LP Returns NULL on failure\&. .RE .LP .nf .B loadPanel(This, Parent, Name) -> wxPanel:wxPanel() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a panel\&. .LP \fIparent\fR\& points to the parent window\&. .RE .LP .nf .B loadPanel(This, Panel, Parent, Name) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Panel = wxPanel:wxPanel() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a panel\&. .LP \fIparent\fR\& points to the parent window\&. This form is used to finish creation of an already existing instance\&. .RE .LP .nf .B loadToolBar(This, Parent, Name) -> wxToolBar:wxToolBar() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Parent = wxWindow:wxWindow() .br Name = unicode:chardata() .br .RE .RE .RS .LP Loads a toolbar\&. .RE .LP .nf .B set(Res) -> wxXmlResource() .br .fi .br .RS .LP Types: .RS 3 Res = wxXmlResource() .br .RE .RE .RS .LP Sets the global resources object and returns a pointer to the previous one (may be NULL)\&. .RE .LP .nf .B setFlags(This, Flags) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Flags = integer() .br .RE .RE .RS .LP Sets flags (bitlist of ?wxXmlResourceFlags enumeration values)\&. .RE .LP .nf .B unload(This, Filename) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxXmlResource() .br Filename = unicode:chardata() .br .RE .RE .RS .LP This function unloads a resource previously loaded by \fIload/2\fR\&\&. .LP Returns true if the resource was successfully unloaded and false if it hasn\&'t been found in the list of loaded resources\&. .RE .LP .nf .B xrcctrl(Window, Name, Type) -> wx:wx_object() .br .fi .br .RS .LP Types: .RS 3 Window = wxWindow:wxWindow() .br Name = string() .br Type = atom() .br .RE .RE .RS .LP Looks up a control\&. .LP Get a control with \fIName\fR\& in a window created with XML resources\&. You can use it to set/get values from controls\&. The object is type casted to \fIType\fR\&\&. Example: .RE