main3.cpp

Go to the documentation of this file.
00001 // $Id: main3.cpp 1765 2007-01-31 11:43:52Z luke $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 // Contains general initialisation of the kernel, after InitPostTools1() is called
00099 
00100 /*
00101 */
00102 
00103 #include "camtypes.h"
00104 #include "selall.h"
00105 #include "keypress.h"
00106 #include "scunit.h"
00107 #include "finfodlg.h"
00108 #include "aligndlg.h"
00109 #include "bmpprefs.h"
00110 #include "renddlg.h"
00111 #include "tracedlg.h"
00112 #include "appprefs.h"
00113 #include "coldlog.h"
00114 #include "opnudge.h"
00115 #include "combshps.h"
00116 #include "colcomp.h"
00117 #include "bmpcomp.h"
00118 #include "princomp.h"
00119 #include "nodebmp.h"
00120 #include "dragcol.h"
00121 #include "dragpick.h"
00122 #include "dragbmp.h"
00123 //#include "convert.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00124 #include "diagnost.h"
00125 //#include "rndrgn.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00126 #include "osrndrgn.h"
00127 //#include "ccobject.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00128 //#include "scrcamvw.h"
00129 //#include "docview.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00130 //#include "document.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00131 //#include "clikmods.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00132 #include "transop.h"
00133 //#include "attrmgr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00134 //#include "ctrlhelp.h"
00135 //#include "fonts.h"
00136 //#include "units.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00137 #include "menuops.h"
00138 #include "hotkeys.h"
00139 //#include "oilkeys.h"
00140 //#include "oilbtns.h"
00141 #include "progress.h"
00142 #include "oilmenus.h"
00143 #include "clipint.h"
00144 //#include "fillattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00145 #include "fontman.h"
00146 #include "fntcache.h"
00147 #include "pathops.h"
00148 #include "tunemem.h"
00149 //#include "epsfiltr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00150 #include "prncamvw.h"
00151 #include "oilruler.h"
00152 //#include "registry.h"
00153 #include "appstate.h"
00154 //#include "basebar.h"
00155 //#include "makebmp.h"
00156 #include "ccpanose.h"
00157 #include "unitcomp.h"   // UnitListComponent
00158 #include "infocomp.h"   // DocInfoComponent
00159 #include "viewcomp.h"
00160 #include "fontcomp.h"
00161 #include "prnmkcom.h"
00162 #include "printprg.h"
00163 #include "hlinkdlg.h"
00164 #include "strkcomp.h"
00165 #include "tmpltdlg.h"
00166 //#include "cxfrech.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00167 #include "styles.h"
00168 #include "brshcomp.h"
00169 //#include "dlgcthlp.h"
00170 //#include "xpehost.h"
00171 #include "editsel.h"
00172 #include "camview.h"
00173 #include "selmedia.h"
00174 
00175 // Normal exe's and standalones
00176 BOOL InitPostTools2()
00177 {
00178     return (
00179             SelectAllOp::Init() &&              // Init the SelectAll op
00180             SelectNoneOp::Init() &&             // Init the SelectNone op
00181 #ifndef EXCLUDE_FROM_XARALX
00182 PORTNOTE("other","Removed a large amount of initialization")
00183             XPEEditOp::Init() &&                // Init the XPE Edit operation
00184             EditSelectionOp::Init() &&          // Init the "Edit Selection" op
00185             KeyPress::Init() &&                 // Init the key press system
00186 #endif
00187             FileInfo::Init() &&                 // Init the document info dialogue
00188 
00189             ArrangeAlignment::Init() &&         // Init the arrange alignment dialogue
00190             OpAlign::Init() &&                  // Init the align op
00191 #ifndef EXCLUDE_FROM_XARALX
00192             BmpPrefsDlg::Init() &&              // Init the export bitmap options dialog
00193 #endif
00194             TraceDlg::Init() &&                 // Init the trace dialog
00195 #ifndef EXCLUDE_FROM_XARALX
00196             WebAddressDlg::Init() &&
00197             PhotoCDDlg::Init() &&               // Init the import PhotoCD options dialog
00198 #endif
00199             RenderDemoDlg::Init() &&            // Init the Render Demo Dialog
00200             AppPrefsDlg::Init() &&              // Init the application preference/options dialog
00201 #ifndef EXCLUDE_FROM_XARALX
00202             TemplateDialog::Init() &&
00203             DocPrefsDlg::Init() &&              // Init the document preference/options dialog
00204 #endif
00205             StandardUnit::Init() &&             // create some standard scale units (scunit.h)
00206             ColourEditDlg::Init() &&            // Init the colour editor dialogue
00207 #ifndef EXCLUDE_FROM_XARALX
00208             OpConvertToBitmap::Init() &&
00209 #endif
00210             OpNudge::Init() &&                  // Init the nudge ops
00211             OpCombineShapes::Init() &&          // init the shape combining ops
00212 
00213             OpMenuSelectPathPoints::Init() &&
00214             OpCreateNodeBitmap::Init() &&
00215 
00216             ColourListComponentClass::Init() && // Init & register the colour list component
00217             BitmapListComponentClass::Init() && // Init & register the bitmap list component
00218             UnitListComponentClass::Init()   && // Init & register the units component
00219             DocInfoComponentClass::Init()    && // Init & register the document information component
00220             WizOpStyleComponentClass::Init() && // Init & register the styles component
00221 
00222             PrintComponentClass::Init()      && // Init & register the print component
00223             PrintMarkComponentClass::Init()  && // Init & register the print marks component
00224             ViewComponentClass::Init()       && // Init & register the view component
00225             FontComponentClass::Init()       && // Init & register the font component
00226 
00227 // Neville 5/8/97 remove Stroking code
00228 #ifdef VECTOR_STROKING
00229             StrokeComponentClass::Init()     && // Init & register the stroke component
00230 #endif // VECTOR_STROKING
00231 
00232             BrushComponentClass::Init()      && // Init & register the brush component
00233             RenderRegion::InitPrefs() &&        // Get the render region prefs from the .INI
00234             OSRenderRegion::Init() &&           // init GDI preferences
00235             SimpleCCObject::Init() &&           // Init the Memory tracking preferences
00236             ClickModifiers::DeclarePrefs() &&
00237             DocView::DeclarePreferences() &&    // Deals with DocViews preferences
00238             Document::ReadPrefs() &&            // read in class Document's preferences
00239             Convert::Init() &&                  // Read number of decimal places, decimal point
00240                                                 // and thousands seperator characters from
00241                                                 // operating system .
00242             ColourDragInformation::Init() &&
00243             ColourPickerDragInformation::Init() &&
00244             BitmapDragInformation::Init() &&
00245 PORTNOTE("other","Removed more initialization")
00246 #ifndef EXCLUDE_FROM_XARALX
00247             InitDiagnosticPrefs() &&            // Get the diagnostic preferences
00248 #endif          
00249             CCamView::ReadViewPrefs() &&
00250             PrintMonitor::InitPrefs() &&
00251             PrintProgressDlg::Init() &&
00252 
00253 #ifndef EXCLUDE_FROM_XARALX
00254             BaseBar::DeclarePreferences() &&
00255 
00256             TransOperation::DeclarePrefs() &&
00257 #endif
00258             AttributeManager::InitDefaults() &&
00259 PORTNOTE("other","Removed yet more initialization")
00260 #ifndef EXCLUDE_FROM_XARALX
00261             ControlHelper::Init() &&
00262             DialogControlHelper::Init() &&
00263             FontFactory::Init() &&
00264 
00265             // The next three inits must be performed in this order
00266 #endif
00267             Unit::Init() &&                     // init the unit class and default units
00268             DocUnitList::Init() &&              // Init the doc unit list system
00269             DimScale::Init()  &&                    // Init the dimension scaling system
00270             OpToolSelect::Init() &&             // Register Tool Selection operation
00271 
00272 
00273 PORTNOTE("other","Removed even more initialization")
00274 #ifndef EXCLUDE_FROM_XARALX
00275             // Must always be initialised after all the tools have been
00276             ToolBarOp::Init() &&                // Make the bar of tool bitmaps
00277 #endif
00278             HotKey::Init() &&                   // Init hotkey system AFTER the tool op descs have been registered
00279 PORTNOTE("other","Removed even more initialization")
00280 #ifndef EXCLUDE_FROM_XARALX
00281             InitHotKeySystem() &&               // Initialise Hot Key system
00282             InitButtonBar() &&                  // Initialise ButtonBar
00283 #endif
00284             Progress::Init() &&                 // Initialise progress cursor/bar displays
00285 
00286             InternalClipboard::Initialise() &&  // Create the application's internal clipboard cache
00287                                                 // (this is a DOCUMENT, so must be left until fairly late)
00288 
00289             InitMenuSystem() &&                 // Initialise Menu system (keep very last)
00290                                                 // (esp. after all Register'ing has been done)
00291 
00292             AttrFillGeometry::Init() &&         // Initialise the fill editing operations
00293 
00294             EPSFilter::InitPrefs() &&           // Initialise default font mappings and
00295                                                 // EPS export prefs
00296 #ifndef DISABLE_TEXT_RENDERING
00297             FontCache::Init() &&
00298 #endif
00299             TunedMemory::Init() &&              // declare prefs for the memory manager
00300 
00301             OILRuler::Init() &&                 // set the ruler widths depending on .ini font settings
00302 
00303 #ifndef EXCLUDE_FROM_XARALX
00304             InitRegistry() &&                   // register us with the shell etc
00305             InitAppState()  &&                  // get workspace prefs
00306 #endif
00307             SelMediaDlg::Init() &&
00308             TRUE
00309             );
00310 }
00311 
00312 

Generated on Sat Nov 10 03:45:41 2007 for Camelot by  doxygen 1.4.4