			Source Code Documentation
			*************************

Most dialog controls are in xMuleGUI_wdr.cpp file, which is generated by
wxDesigner. To make modifications, you need to open the file xMuleGUI.wdr
with wxDesigner and export c++ code. Most icons are also in the same file,
make modifications with wxDesigner in the Bitmap Lists section.

I have moved several dialogs out from the wxDesigner generated file, as
wxDesigner didn't provide enough control over it. These code parts can be
found in their respective classes, in function CreateControls().

Also, several icons have been moved away from wxDesigner file, into 
images/default folder. The idea is to, at some point, completely move
all images out from wdr file, and then provide means for users to create
custom iconsets - new iconsets would be placed into images/<iconset> dir.

Compilation instructions:
	* Mingw/Cygwin:
		First you need to compile and install wxMSW, get a tarball
		from www.wxwindows.org. After that, go to src/, type
  		'make -f Makefile.win', and it should compile.
	* Linux/Unix:
		Install wxGTK either using a source tarball or rpm/deb. In
		latter case, you will also need wxGTK-devel package. Then
		go to src/ subdir, and type 'make'. In most cases, it will
		work, but if you run into trouble, you might want to check
		the first line in the Makefile, locate your wx-config file
		(or wxgtk2-2.4-config), which should usually be around
		/usr/local/bin, and enter full path into the Makefile.
		Note:	You will also need to patch wx to get columns 
			completely hidden. Use the listctrl.patch file 
			and apply at src/generic directory in wxGTK source 
			hierarchy.
	* Mac OS X:
		No information is available at current time.

Most class names represent their respective dialog controls. All dialogs have
their own classes. Also, most list controls have their own classes, as we need
to do lot of event handling and other such stuff in there, which would
otherwise bloat the parent control class.

We use CMListCtrl class (derived from wxListCtrl) for list controls to keep
common events and methods in same place.

* xMuleGUI class
	This class is the topmost class in the class hierarchy. This is called
	on application startup and it creates the main dialog frame xMuleDlg.
	Any possible command arguments are also handled here.

* xMuleDlg class
	This class handles the main dialog functions, such as Toolbar and 
	Statusbar. Also, displaying any additional dialog pages such as Server
	page, Search page etc are called from here.
	
The remaining classes shouldn't need extra description (I might add some at a
later time tho).

Few hints on hacking the source:

* To add a dialog control:
	First open the xMuleGUI.wdr file in wxDesigner, and see if your dialog
	is in there. If yes, you'r lucky - refer to wxDesigner documentation
	on further information.

	Some dialogs aren't in wxDesigner file tho - those are the ones I had
	to modify by hand to get the desired result. You can find these usually
	in its respective class, in function CreateControls().

* To add listctrl columns:
	Go to the listctrl class you wish to add the column into (for example, 
	to add a column into serverlist, go to ServerListCtrl.cpp), and find
	the class constructor (usually first function in file). You can see
	an array of strings there containing column headers - add your column
	header string there. Then check the loops few lines below that insert
	the columns, and make sure you update the counters to match the new
	columns count (this should be automated at some point).

* To add toolbar button:
	Go to xMuleDlg.cpp, function CreateMyToolBar(), and add your button
	there. Then also add an event handler for your new button, and a 
	function to handle that event.

* To change images (any):
	Most images are (at current point) stored in xMuleGUI_wdr.cpp file 
	which is generated by wxDesigner - use wxDesigner to add your image. 
	But I'm working on removing all images from the file and moving them 
	to src/images/default dir to make image changing easier and allow 
	creating custom iconsets - if the image drawing code isn't in 
	wxDesigner generated file, you need to add/change your image in that 
	dir.

* Localization:
	All strings enclosed to _() macro are automatically translated, if
	the translation is found. Instructions for creating new translations
	are in TRANSLATION file.

If you have further questions/ideas that should go to this file, please 
contact me via madcat_@users.sf.net (don't forget the _ :P), and I will 
add the documentation.
