wxWidgets/samples
Julian Smart af1337b041 Applied [ 594925 ] Implement wxArtProvider and XRC together
By Robert O'Connor (robertoconnor)

This patch is a draft which successfully allows a wxArtProvider to serve out icons to bitmaps for XRC files.

The syntax to use a wxArtProvider bitmap is:
<bitmap stock_id="wxART_INFORMATION" stock_client="wxART_TOOLBAR">somefallbackicon.png</bitmap>

The bitmap is optional, and will only be used as a fallback image, if the wxArtProvider returned a wxNullBitmap for some reason.

The client attribute, if not specified, currently will be wxART_OTHER. Perhaps there should be a guessing heuristic of it being in a menu node to call wxART_MENU.

Usage of XRC resouces and wxArtProvider together can be seen in an updated /contrib/samples/xrc demo, which is a separate patch.

Search the wx-dev mailing lists for "wxArtProvider" and "XRC" for the full discussions on this feature's API design.

Applied patch [ 594932 ] Extended XRC XML resources sample
By Robert O'Connor (robertoconnor)

This is a more comprehensive introduction to how to get up and running using XRC in your new wxWindows project.

It describes both the basics (for new users) and advanced features. It consists of a demo of dialogs and frames loaded from XRC. Each dialog has a textctrl at the top of the dialog, which walks the new user through that feature.

There are 8 demos:

The 4 basic ones:
-A non-derived dialog, as typically used for an about dialog.
-A derived dialog that loads its resources from an XRC (a frequently-asked question on the mailing lists), and responds to some simple events, including the disable-another-control-via-EVT_UPDATE_UI that is another FAQ, and powerful and simple-to-use feature.
-A XRC reference "Controls" dialog, using a notebook. Each tab has a single control. All XRC handled widgets can be seen at a glance, and how to use them under XRC.
-An uncentered dialog, to demonstrate the easy use of <centered>1</centered> to automatically place a Dialog centered on its parent..

The 4 advanced ones:
-Embedding a custom class into an XRC dialog, by using the "unknown" class.
-Using wxArtProvider to use stock icons from within your your XRC resources.
-Using the platform attribute to selectively show a part of XRC based on the current OS.
-Runtime variable expansion (demo only. Not implemented at this time).

Also:
-The main frame is now demonstrated as being loaded as an XRC.
- The toolbar has longhelp tag demonstrated, and are hooked up to the same events as the menu to show how XRCID() works on the same tool and menuitem XRCID.
-Some custom icons for the demonstration were created, and put into the toolbar and menubar. A custom icon also for the demonstration.
-The example code has been put in 1 class per file (both .cpp and a matching .xrc), to make it much less confusing for a newcomer to figure out what class is what, expecially with all the wx macros for declaration and implementation.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-16 11:24:46 +00:00
..
artprov Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
calendar updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
caret updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
checklst tests for multiple selection check listboxes 2002-05-09 21:58:04 +00:00
config Unicode compilation problems in the samples (patch from Dimitri) 2002-05-10 12:26:30 +00:00
console added wxMemoryOutputStream test 2002-06-21 22:07:13 +00:00
controls Fix to not break GTK2 output. (wxLogMessage bug). 2002-08-15 20:48:02 +00:00
db Enhanced the DataTypeSupported() function to show the native data type name that is being automatically used by the wxODBC class column types 2002-06-13 17:51:56 +00:00
dialogs fixed checking/unchecking find/replace items in the menu problem (they becameo ut of sync with the real status) 2002-07-02 22:30:31 +00:00
dialup Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
dnd Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-02 08:16:15 +00:00
docview applied patch to build wxMSW with CW7 (patch 550445) 2002-05-09 22:34:44 +00:00
docvwmdi updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
dragimag updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
drawing ifdefed out Offset call for Mac 2002-06-20 11:46:58 +00:00
dynamic updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
erase Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
event updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
exec Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
font use new style ctor for wxFontDialog (patch 561411) 2002-05-28 16:52:49 +00:00
grid new makefile 2002-04-08 09:27:24 +00:00
help Added USE_SIMPLE_HELP_PROVIDER symbol to help demo so we can test 2002-06-07 08:47:39 +00:00
html Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
image added test for loading image from wxMemoryStream 2002-05-24 22:23:24 +00:00
internat Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
ipc Unicode compilation problems in the samples (patch from Dimitri) 2002-05-10 12:26:30 +00:00
joytest Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
keyboard BC++ 32-bit makefile now copies setup.h to the correct place 2002-04-08 14:12:56 +00:00
layout updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
listbox updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
listctrl added test for EditLabel, Unicode fixes 2002-05-26 10:53:51 +00:00
mdi removing bitmaps from mdi sample 2002-06-12 11:56:01 +00:00
memcheck Added __WXX11__ tests where appropriate 2002-03-21 10:32:18 +00:00
menu updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
mfc patch from Dimitri fixing a few memory leaks and unTABbing the sources 2002-03-17 14:16:03 +00:00
minifram minifram sample modified to use XPMs 2002-06-14 10:21:52 +00:00
minimal updated project files 2002-08-12 05:28:46 +00:00
mobile Added background inheritance to wxUniv. 2002-04-26 18:28:30 +00:00
multimon Applied patch [ 573644 ] wxDisplay for Mac (again) 2002-07-19 20:42:34 +00:00
nativdlg patch from Dimitri fixing a few memory leaks and unTABbing the sources 2002-03-17 14:16:03 +00:00
newgrid Added test showing problem with small grids 2002-04-12 16:31:38 +00:00
notebook added a command to delete last page and not only the current one 2002-08-16 00:09:29 +00:00
oleauto Added __WXX11__ tests where appropriate 2002-03-21 10:32:18 +00:00
opengl fixed compilation error when x-compiling (patch from Fabian Wenzel) 2002-05-10 12:56:51 +00:00
ownerdrw removed a few warnings and CW compilation problems (patch from Dimitri) 2002-03-27 18:43:13 +00:00
png updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
printing Changed wxStat, wxAccess and wxOpen to no longer 2002-08-08 21:44:50 +00:00
proplist updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
propsize Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
regtest updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
resource updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
richedit updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
rotate updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
sashtest updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
scroll updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
scrollsub Added wxComboBox to scroll test to demonstrate Mac problem 2002-07-29 19:17:44 +00:00
sockets Added __WXX11__ tests where appropriate 2002-03-21 10:32:18 +00:00
splitter added SetSashPosition() test 2002-07-12 13:23:53 +00:00
statbar updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
stc Applied patch [ 571965 ] update stc contrib stuff 2002-06-23 14:01:57 +00:00
svg svg Unix fix 2002-06-21 09:46:32 +00:00
tab updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
taskbar Added taskbar sample Makefile.in 2002-06-23 13:53:15 +00:00
text fixed small memory leak 2002-07-21 20:44:11 +00:00
thread Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
toolbar added test for toggling the main toolbar 2002-07-23 14:08:39 +00:00
treectrl 1. more consistency in wxTree/ListEvent methods naming convention: 2002-07-21 14:29:13 +00:00
treelay updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
typetest updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
validate updated CodeWarrior 5.3 exported xml projects 2002-04-07 18:28:15 +00:00
widgets Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth 2002-08-01 19:12:24 +00:00
wizard renamed Wiztest.bmp to wiztest.bmp 2002-05-10 15:16:33 +00:00
wxtest added VC++ project file 2002-04-26 20:34:25 +00:00
xrc Applied [ 594925 ] Implement wxArtProvider and XRC together 2002-08-16 11:24:46 +00:00
.cvsignore ignore samples workspace files 2001-10-10 01:15:51 +00:00
configure refuse to run if not executed by the main configure script 2002-05-18 23:36:55 +00:00
configure.in Applied patch [ 566194 ] Adds taskbar sample to configure-targets 2002-06-23 13:55:20 +00:00
makefile.b32 Applied docview patch 2002-04-12 13:15:44 +00:00
makefile.dos Applied docview patch 2002-04-12 13:15:44 +00:00
makefile.g95 Applied docview patch 2002-04-12 13:15:44 +00:00
Makefile.in replaced make with $MAKE 2000-03-11 16:38:01 +00:00
makefile.vc Applied docview patch 2002-04-12 13:15:44 +00:00
samples.dsw Applied docview patch 2002-04-12 13:15:44 +00:00