| 1 |
====wxFRED2 - Port of Volition's FReespace EDitor to use wxWidgets GUI libraries==== |
| 2 |
===Required Libraries=== |
| 3 |
You must have wxWidgets 2.9.4 or later. |
| 4 |
|
| 5 |
==Visual Studio== |
| 6 |
MSVC users may download the headers and binaries directly from the wxWidgets hosts: |
| 7 |
- wxWidgets 2.9.4: http://sourceforge.net/projects/wxwindows/files/2.9.4/binaries/ |
| 8 |
- wxWidgets 2.9.5: http://sourceforge.net/projects/wxwindows/files/2.9.5/binaries/ |
| 9 |
|
| 10 |
Be sure to download the wxWidgets-2.9.X_Headers.7z and the appropriate wxMSW-2.9.X_vcXX_Dev.7z |
| 11 |
The vcXX may be: |
| 12 |
- vc80 - MSVC 2005 |
| 13 |
- vc90 - MSVC 2008 |
| 14 |
- vc100 - MSVC 2010 |
| 15 |
|
| 16 |
==Other IDE's== |
| 17 |
All other programming environments must compile their libraries from the source. Download from the appropriate "source archive" linked in the page below: |
| 18 |
- http://www.wxwidgets.org/downloads/ |
| 19 |
|
| 20 |
|
| 21 |
===Directory Map=== |
| 22 |
"/wxfred2/base" |
| 23 |
- contains the tool generated files which are derived by all windows, frames, and dialogs found elsewhere in "/wxfred2" |
| 24 |
|
| 25 |
"/wxfred2/editors" |
| 26 |
- contains the source code for frames and dialogs listed under the Editors menu in wxFRED2. |
| 27 |
- Also includes an XML resource file (".xrc") which may be, and is recommended to be, used by a WYSIWYG editor to edit the GUI elements of wxfred2. At the time of this writing, wxFormBuilder v3.3 - beta proved to be stable enough to create all the elements, although the generated wxFRED2_base.cpp had to be sanitized of deprecated flags in order for it to be compiled under the wxWidgets 2.9.4 lib. |
| 28 |
|
| 29 |
"/wxfred2/help" |
| 30 |
- contains the source code for the "About" and help dialogs listed under the Help menu in wxFRED2. |
| 31 |
|
| 32 |
"/wxfred2/misc" |
| 33 |
- contains the source code for miscillanious tools listed under the Misc menu in wxFRED2. |
| 34 |
|
| 35 |
"/wxfred2/res" |
| 36 |
- contains the resouce files used by wxFRED2 during runtime, these are typically images used for the graphic buttons. |
| 37 |
|
| 38 |
|
| 39 |
===Importing wxFRED2.xrc into a WYSIWYG Editor=== |
| 40 |
==wxFormBuilder== |
| 41 |
To import wxFRED2.xrc into wxFormBuilder: |
| 42 |
|
| 43 |
1. Open wxFormBuilder, and create a new project (File->New Project) |
| 44 |
|
| 45 |
2. Import wxFRED2.xrc (File->Import XRC...) |
| 46 |
|
| 47 |
3. In the left-hand panel labeled "Object Tree," select the project name at the very top of the tree. You most likely will need to scroll up. |
| 48 |
|
| 49 |
4. In the right-hand panel labeled "Object Properties," change the properties to the following: |
| 50 |
. Under "Project": |
| 51 |
. name to "wxFRED2" or your name of choice |
| 52 |
. path to "/" |
| 53 |
. embedded_files_path to "../res/" |
| 54 |
. code_generation to "C++, XRC" (check both boxes by expanding the group) |
| 55 |
|
| 56 |
5. Under "C++ Properties": |
| 57 |
. use_enum to "checked" |
| 58 |
. namespace to "fredBase" |
| 59 |
. event_generation to "table" |
| 60 |
. disconnect_events to "not checked" |
| 61 |
|
| 62 |
==Other WYSIYWG Editors== |
| 63 |
Importing into other WYSIWYG editors should be similar to importing into wxFormBuilder. Be sure the options in steps 4 and 5 are set as they are so that for your newly generated files to play nice with the existing "/wxfred2/" code. |
| 64 |
|
| 65 |
Please be sure to NOT include the project file from the WYSIWYG editor in your commits to the fs2_open repo, as they are far larger than the .xrc and are usually specific to that editor! |