]> git.saurik.com Git - wxWidgets.git/blob - samples/xrc/rc/artprov.xrc
fixing reentrancy which happened in tests, bringing client coordinates origins in...
[wxWidgets.git] / samples / xrc / rc / artprov.xrc
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
4
5 <object class="wxDialog" name="art_provider_dialog">
6 <title>wxArtProvider Example</title>
7 <centered>1</centered>
8 <object class="wxFlexGridSizer">
9 <cols>1</cols>
10 <rows>0</rows>
11 <vgap>0</vgap>
12 <hgap>0</hgap>
13 <growablecols>0</growablecols>
14 <growablerows>0</growablerows>
15 <object class="sizeritem">
16 <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
17 <border>5</border>
18 <object class="wxTextCtrl" name="message_textctrl">
19 <size>500,150</size>
20 <style>wxTE_MULTILINE</style>
21 <value>You can specify wxArtProvider icons in your XRC resources. These icons will be retrieved from the active wxArtProvider (see wxArtProvider in docs and /samples/artprov for more information on wxArtProvider).\n\nThe most common usage for this is that you want a dialog, toolbar or menu item to have the correct platform-specific icon in your interface, such as a custom "Don't show this again" checkbox message dialog that has the appropriate icon, as shown below.\n\nYou can also use it to manage your own custom bitmaps though, too--instead of having to write multiple versions of an XRC file that only differ in their bitmaps, you can instead just write one XRC file with the bitmap to be retrieved from the wxArtProvider at runtime, having your custom wxArtProvider use some code to serve out the desired bitmap based on such things as a wxConfig n entry of a desired icon set, what OS the application is running on, what size or resolution the display is, and so on.\n\nNote that your application's custom bitmaps are the only thing that will differ between OS's in order to ensure proper Look And Feel, as everything else: windows decoration, colors, fonts, widgets, etc already match perfectly since wxWindows runs natively.\n\nTo use a wxArtProvider bitmap instead of usual bitmap, in your XRC, instead of &lt;bitmap&gt;somefile.png&lt;/bitmap&gt;, use &lt;bitmap stock__id="SOME__ART__ID" client="SOME__CLIENT__ID"&gt;somefile.png&lt;/bitmap&gt;. The stock__id parameter is required for a bitmap to be read from wxArtProvider, stock__client is optional. The image filename is also optional, and is just used as a fallback in case the wxArtProvider couldn't return a bitmap for that particular stock__id (and particular stock__client if your wxArtProvider is set up to also filter stock__client).</value>
22 </object>
23 </object>
24 <object class="sizeritem">
25 <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
26 <border>5</border>
27 <object class="wxFlexGridSizer">
28 <cols>2</cols>
29 <rows>0</rows>
30 <vgap>0</vgap>
31 <hgap>0</hgap>
32 <growablecols>1</growablecols>
33 <growablerows>0</growablerows>
34 <object class="sizeritem">
35 <flag>wxALIGN_CENTRE|wxALL</flag>
36 <border>5</border>
37 <object class="wxStaticBitmap" name="my_bitmap">
38 <bitmap stock_id="wxART_INFORMATION" stock_client="wxART_MESSAGE_BOX">derivdlg.xpm</bitmap>
39 </object>
40 </object>
41 <object class="sizeritem">
42 <flag>wxALIGN_CENTRE|wxALL</flag>
43 <border>5</border>
44 <object class="wxStaticText" name="message_statictext">
45 <label>Your web connection is optimized perfectly.</label>
46 </object>
47 </object>
48 </object>
49 </object>
50 <object class="sizeritem">
51 <flag>wxALIGN_CENTRE|wxALL</flag>
52 <border>5</border>
53 <object class="wxCheckBox" name="dont_show_checkbox">
54 <label>Don't show this message again</label>
55 </object>
56 </object>
57 <object class="sizeritem">
58 <flag>wxALIGN_CENTRE|wxALL</flag>
59 <border>5</border>
60 <object class="wxButton" name="wxID_OK">
61 <label>OK</label>
62 </object>
63 </object>
64 </object>
65 </object>
66
67 </resource>