barcreationdlg.h

Go to the documentation of this file.
00001 // $Id: barcreationdlg.h 1282 2006-06-09 09:46:49Z alex $
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 
00099 #ifndef INC_BARCREATIONDLG
00100 #define INC_BARCREATIONDLG
00101 
00102 //#include "dialogop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00103 
00104 #define OPTOKEN_BARCREATIONDLG _T("BarCreationDlg")
00105 #define OPTOKEN_BARSTATESDLG _T("BarStatesDlg")
00106 #define OPTOKEN_BARREDEFINESTATEDLG _T("BarRedefineStateDlg")
00107 
00108 
00109 
00110 /********************************************************************************************
00111 
00112 >   class BarCreationDlg : public DialogOp
00113 
00114     Author:     Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
00115     Created:    13/8/99
00116     Purpose:    Dialog to make building button bar rollovers easier
00117 
00118 ********************************************************************************************/
00119 
00120 class BarCreationDlg : public DialogOp
00121 {
00122     CC_DECLARE_DYNCREATE(BarCreationDlg);
00123 
00124     //Constructors, destructors and initialiser
00125 public:
00126     BarCreationDlg();
00127     ~BarCreationDlg();
00128 
00129     static  BOOL Init();
00130 
00131     // Creating the dialog
00132 public:
00133     void Do(OpDescriptor*);
00134     void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00135 
00136 protected:
00137     BOOL Create();
00138     BOOL SetUpControls( BOOL DoScan = TRUE);
00139     BOOL SetUpDynamicControls();
00140     BOOL CreateBar();
00141     void ReadBarProperties();
00142     void WriteBarProperties();
00143     INT32 GetBarNumber();
00144     void EnableAllMyControls(BOOL enable);
00145 
00146     // Operations (functions that other objects call)
00147 public:
00148     virtual MsgResult Message(Msg* Message);
00149     static  OpState GetState(String_256*, OpDescriptor*);
00150 
00151     //Member variables
00152 protected:
00153     static BarCreationDlg *TheDialog;   // Points to the only Web Address dialog object
00154 
00155     BOOL m_IsEditing;
00156     BOOL m_FirstIsEditing;
00157     String_256 m_BarName;
00158     String_256 m_FirstBarName;
00159     BOOL m_AlreadyInThisFunction;
00160     BOOL m_HasBackBar;
00161     BOOL m_ValidBar;
00162     
00163 public:
00164     static const UINT32 IDD;
00165     static const CDlgMode Mode;
00166 
00167 public:
00168     static BOOL ms_WantMouse;
00169     static BOOL ms_WantClicked;
00170     static BOOL ms_WantSelected;
00171     static BOOL ms_WantDefault;
00172     static BOOL ms_IsVertical;
00173     static BOOL ms_SuggestDesign;
00174     static INT32 ms_NoOfButtons;
00175     static INT32 ms_Mode;
00176     //static BOOL ms_SameSize;
00177     static INT32 ms_SizeJustification;
00178     static BOOL ms_Continuous;
00179     static INT32 ms_Spacing;
00180     static INT32 ms_Stretching;
00181     static BOOL ms_FromSelection;
00182     static INT32 ms_StateToCreate;
00183     static BOOL ms_GroupsStretch;
00184 };
00185 
00186 
00187 
00188 class OpParamBarCreationDlg : public OpParam
00189 {
00190 //CC_DECLARE_DYNAMIC(OpParamBarCreation)
00191 
00192 public:
00193     OpParamBarCreationDlg()
00194             {   
00195                 m_IsEditing = FALSE;
00196                 m_BarName = "Bar1";
00197                 m_ButtonsToEdit = 0;
00198             }
00199 
00200     OpParamBarCreationDlg(BOOL IsEditing, String_256 BarName = "Bar1", INT32 ButtonsToEdit = 0)
00201             {   
00202                 m_IsEditing = IsEditing;
00203                 m_BarName = BarName;
00204                 m_ButtonsToEdit = ButtonsToEdit;
00205             }
00206 
00207     BOOL m_IsEditing;
00208     String_256 m_BarName;
00209     INT32 m_ButtonsToEdit;
00210 };
00211 
00212 /********************************************************************************************
00213 
00214 >   class BarStatesDlg : public DialogOp
00215 
00216     Author:     Simon_Knight (Xara Group Ltd) <camelotdev@xara.com>
00217     Created:    8/5/00
00218     Purpose:    Dialog to make building button bar states
00219 
00220 ********************************************************************************************/
00221 
00222 class BarStatesDlg : public DialogOp
00223 {
00224     CC_DECLARE_DYNCREATE(BarStatesDlg);
00225 
00226     //Constructors, destructors and initialiser
00227 public:
00228     BarStatesDlg();
00229     ~BarStatesDlg();
00230 
00231     static  BOOL Init();
00232 
00233     // Creating the dialog
00234 public:
00235     void Do(OpDescriptor*);
00236     void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00237 
00238 protected:
00239     BOOL Create();
00240     void SetUpControls();
00241     BOOL ScanForBarDetails();
00242     BOOL CreateBarStates(BOOL ReCreate = FALSE);
00243     BOOL OnSelectionChanged();
00244 
00245     // Operations (functions that other objects call)
00246 public:
00247     virtual MsgResult Message(Msg* Message);
00248     static  OpState GetState(String_256*, OpDescriptor*);
00249 
00250     //Member variables
00251 protected:
00252     static BarStatesDlg *TheDialog; // Points to the only dialog object
00253     String_256 m_BarName;
00254     static INT32 m_State;
00255     static INT32 ms_SuggestDesign;
00256     BOOL m_StateExists[5];
00257     BOOL m_ValidBar;
00258 
00259 public:
00260     static const UINT32 IDD;
00261     static const CDlgMode Mode;
00262 
00263 };
00264 
00265 
00266 
00267 class OpParamBarStatesDlg : public OpParam
00268 {
00269 
00270 public:
00271     OpParamBarStatesDlg()
00272             {   
00273                 m_BarName = "Bar1";
00274             }
00275 
00276     OpParamBarStatesDlg(String_256 BarName)
00277             {   
00278                 m_BarName = BarName;
00279             }
00280 
00281     String_256 m_BarName;
00282 };
00283 
00284 
00285 
00286 
00287 
00288 
00289 class BarRedefineStateDlg : public DialogOp
00290 {
00291     CC_DECLARE_DYNCREATE(BarRedefineStateDlg);
00292 
00293     //Constructors, destructors and initialiser
00294 public:
00295     BarRedefineStateDlg();
00296     ~BarRedefineStateDlg();
00297 
00298     static  BOOL Init();
00299 
00300     // Creating the dialog
00301 public:
00302     void Do(OpDescriptor*);
00303     void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00304     BOOL IsAttribInSelected(Node * pNode);
00305 
00306 protected:
00307     BOOL Create();
00308     BOOL SetUpControls();
00309     BOOL RedefineState();
00310 
00311     // Operations (functions that other objects call)
00312 public:
00313     virtual MsgResult Message(Msg* Message);
00314     static  OpState GetState(String_256*, OpDescriptor*);
00315 
00316     //Member variables
00317 protected:
00318     static BarRedefineStateDlg *TheDialog;  // Points to the only dialog object
00319     String_256 m_BarName;
00320     INT32 m_State;
00321 
00322 public:
00323     static const UINT32 IDD;
00324     static const CDlgMode Mode;
00325 
00326 };
00327 
00328 class OpParamBarRedefineStateDlg : public OpParam
00329 {
00330 
00331 public:
00332     OpParamBarRedefineStateDlg()
00333             {   
00334                 m_BarName = "Bar1";
00335                 m_State = 0;
00336             }
00337 
00338     OpParamBarRedefineStateDlg(String_256 BarName, INT32 State)
00339             {   
00340                 m_BarName = BarName;
00341                 m_State = State;
00342             }
00343 
00344     String_256 m_BarName;
00345     INT32 m_State;
00346 };
00347 
00348 
00349 
00350 
00351 
00352 #endif //INC_BARCREATIONDLG
00353 

Generated on Sat Nov 10 03:44:17 2007 for Camelot by  doxygen 1.4.4