aprps.h

Go to the documentation of this file.
00001 // $Id: aprps.h 1282 2006-06-09 09:46:49Z alex $
00002 //#pragma message("Start of aprps.h")
00003 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00004 ================================XARAHEADERSTART===========================
00005  
00006                Xara LX, a vector drawing and manipulation program.
00007                     Copyright (C) 1993-2006 Xara Group Ltd.
00008        Copyright on certain contributions may be held in joint with their
00009               respective authors. See AUTHORS file for details.
00010 
00011 LICENSE TO USE AND MODIFY SOFTWARE
00012 ----------------------------------
00013 
00014 This file is part of Xara LX.
00015 
00016 Xara LX is free software; you can redistribute it and/or modify it
00017 under the terms of the GNU General Public License version 2 as published
00018 by the Free Software Foundation.
00019 
00020 Xara LX and its component source files are distributed in the hope
00021 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00022 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00023 See the GNU General Public License for more details.
00024 
00025 You should have received a copy of the GNU General Public License along
00026 with Xara LX (see the file GPL in the root directory of the
00027 distribution); if not, write to the Free Software Foundation, Inc., 51
00028 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00029 
00030 
00031 ADDITIONAL RIGHTS
00032 -----------------
00033 
00034 Conditional upon your continuing compliance with the GNU General Public
00035 License described above, Xara Group Ltd grants to you certain additional
00036 rights. 
00037 
00038 The additional rights are to use, modify, and distribute the software
00039 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00040 library and any other such library that any version of Xara LX relased
00041 by Xara Group Ltd requires in order to compile and execute, including
00042 the static linking of that library to XaraLX. In the case of the
00043 "CDraw" library, you may satisfy obligation under the GNU General Public
00044 License to provide source code by providing a binary copy of the library
00045 concerned and a copy of the license accompanying it.
00046 
00047 Nothing in this section restricts any of the rights you have under
00048 the GNU General Public License.
00049 
00050 
00051 SCOPE OF LICENSE
00052 ----------------
00053 
00054 This license applies to this program (XaraLX) and its constituent source
00055 files only, and does not necessarily apply to other Xara products which may
00056 in part share the same code base, and are subject to their own licensing
00057 terms.
00058 
00059 This license does not apply to files in the wxXtra directory, which
00060 are built into a separate library, and are subject to the wxWindows
00061 license contained within that directory in the file "WXXTRA-LICENSE".
00062 
00063 This license does not apply to the binary libraries (if any) within
00064 the "libs" directory, which are subject to a separate license contained
00065 within that directory in the file "LIBS-LICENSE".
00066 
00067 
00068 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00069 ----------------------------------------------
00070 
00071 Subject to the terms of the GNU Public License (see above), you are
00072 free to do whatever you like with your modifications. However, you may
00073 (at your option) wish contribute them to Xara's source tree. You can
00074 find details of how to do this at:
00075   http://www.xaraxtreme.org/developers/
00076 
00077 Prior to contributing your modifications, you will need to complete our
00078 contributor agreement. This can be found at:
00079   http://www.xaraxtreme.org/developers/contribute/
00080 
00081 Please note that Xara will not accept modifications which modify any of
00082 the text between the start and end of this header (marked
00083 XARAHEADERSTART and XARAHEADEREND).
00084 
00085 
00086 MARKS
00087 -----
00088 
00089 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00090 designs are registered or unregistered trademarks, design-marks, and/or
00091 service marks of Xara Group Ltd. All rights in these marks are reserved.
00092 
00093 
00094       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00095                         http://www.xara.com/
00096 
00097 =================================XARAHEADEREND============================
00098  */
00099 #ifndef INC_APRPS
00100 #define INC_APRPS
00101 
00102 //#include "dialogop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00103 #include "property.h"
00104 #include "layerprp.h"
00105 #include "snap.h"
00106 //#include "listitem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00107 //#include "list.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 //#include "undoop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00109 //#include "unittype.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00110 //#include "units.h"         - in camtypes.h [AUTOMATICALLY REMOVED]
00111 #include "property.h"   
00112 #include "sgframe.h"
00113 //#include "msg.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00114 #include "cbmpdata.h"
00115 
00116 //#pragma message("After includes")
00117 
00118 class Layer;
00119 class GIFAnimationPropertyTabs;
00120 
00121 /********************************************************************************************
00122 
00123 >class GIFAnimationPropertyTabsDlg : public DialogTabOp
00124 
00125     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00126     Created:    10/06/97
00127     Purpose:    The Gif Animation Properties dialog box
00128     
00129 ********************************************************************************************/
00130 
00131 #define OPTOKEN_GIFANIMPROPERTYTABS _T("GifAnimationPropertyTabs")
00132 
00133 class GIFAnimationPropertyTabsDlg : public DialogTabOp
00134 {
00135     CC_DECLARE_DYNCREATE(GIFAnimationPropertyTabsDlg)
00136 
00137 public:
00138     GIFAnimationPropertyTabsDlg(CDlgResID DummyDialogResID,CDlgMode Mode);      // Constructor
00139     GIFAnimationPropertyTabsDlg();                                              // Default Constructor      
00140     ~GIFAnimationPropertyTabsDlg();                                             // Destructor
00141 
00142     void Do(OpDescriptor*);                                                     // "Do" function
00143 
00144     static BOOL Init();                                                         // Setup function
00145     static void Deinit();                                                       // Remove function
00146 
00147     static OpState GetState(String_256*, OpDescriptor*);
00148                                                                                 // Return the state of this operation
00149     virtual MsgResult Message(Msg* Message);                                    // Message handler
00150     virtual BOOL RegisterYourPagesInOrderPlease();                              // Add in tab pages
00151         
00152     static const CDlgResID IDD;                                                 // Dialog box id
00153     static CDlgMode Mode;                                                       // Dialog box mode of operation (mode or modeless)
00154 
00155     BOOL CommitDialogValues();
00156 
00157     static GIFAnimationPropertyTabs* GetGIFAnimationPropertiesTabs();           // Returns a pointer to the animation properties handling class.    
00158     static GIFAnimationPropertyTabsDlg* GetGIFAnimationPropertyTabsDlg()        { return m_pGIFAnimationPropertyTabsDlg; }  
00159 
00160     static  void SetPageToOpen(INT32 val)       { m_PageToOpen = val;  }            // The page which the dialog should open with.
00161     static  BOOL GetPageToOpen()            { return m_PageToOpen; }
00162 
00163 protected:
00164     String_256 TitleString;                                                 // Dialog box title.    
00165     static  GIFAnimationPropertyTabs*   m_pGIFAnimationProperties;          // pointer to the list class handling this tab.
00166     static  INT32   m_PageToOpen;                                               // The page to open at start up.
00167     static  GIFAnimationPropertyTabsDlg* m_pGIFAnimationPropertyTabsDlg;    // A static pointer to this dialog.     
00168 };
00169 
00170 /*********************************************************************************************************
00171 
00172 >   class CCAPI GIFAnimationPropertyTabs : public PropertyTabs
00173 
00174     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00175     Created:    10/06/97
00176     Purpose:    These encompass all the tabs available for the Animation properties dialog box to use. 
00177 
00178 ***********************************************************************************************************/
00179 
00180 class CCAPI GIFAnimationPropertyTabs : public PropertyTabs
00181 {
00182     CC_DECLARE_DYNCREATE(GIFAnimationPropertyTabs);
00183 
00184 public:
00185         
00186     GIFAnimationPropertyTabs();                         // Constructor
00187 
00188     static BOOL InitGIFAnimationPropertyTabs();         // set up all option tabs available
00189     static void DeinitGIFAnimationPropertyTabs();       // remove all option tabs available
00190     static GIFAnimationPropertyTabs *GetFirst();
00191     static GIFAnimationPropertyTabs *GetNext(GIFAnimationPropertyTabs*);
00192 
00193     virtual BOOL Init();                    
00194     static  BOOL DeclareGIFAnimationProperty(GIFAnimationPropertyTabs *pGIFAnimationProperty);
00195             BOOL SameflDelayValues();                   // Do all the frame layers have the same delay value.
00196     virtual BOOL GetApplyNowState();                    // Get current state of ApplyNow flag
00197     virtual BOOL SetApplyNowState(BOOL NewState);       // set new state for ApplyNow 
00198     virtual BOOL SetInitMessageState(BOOL NewState);    // set new state of InitMessage
00199     virtual BOOL GetInitMessageState();                 // get current state of InitMessage
00200     virtual CDlgResID GetPageID();                      // Return section/page id system
00201     virtual BOOL InitSection();                         // Called when page first opened
00202     virtual BOOL CommitSection();                       // Called when ok action is required
00203     virtual BOOL HandleMsg(DialogMsg* Msg);             // Called when messages arrive
00204         
00205     static UINT32 FramePropertiesTabNumber;             // Tab number assigned to the frame properties tab.
00206     static UINT32 AnimationColoursTabNumber;                // Tab number assigned to the animation colours tab.    
00207     static UINT32 AnimationPropertiesTabNumber;         // Tab number assigned to the animation properties tab.
00208     static UINT32 PreviewInBrowserTabNumber;                // Tab number assigned to the Preview In Browser tab.
00209     
00210     virtual DialogTabOp * GetTabbedDlg();                   // return pointer to the main dialog box
00211     static  BOOL        SetTabbedDlg(DialogTabOp * pDlg);       // return pointer to the main dialog box
00212     static  void        IncCount(UINT32 Count)                  { m_Count += Count; }
00213     static  void        DecCount(UINT32 Count)                  { m_Count -= Count; } 
00214     static  UINT32      GetCount()                              { return m_Count;   }
00215 
00216     static  void    SetIncludeFramePropertiesTab(BOOL Val)      { m_IncludeFramePropertiesTab = Val;  }
00217     static  BOOL    GetIncludeFramePropertiesTab()              { return m_IncludeFramePropertiesTab; }
00218     static  void    SetBrowserPreviewTab(BOOL Val)              { m_BrowserPreviewTab = Val;  }
00219     static  BOOL    GetBrowserPreviewTab()                      { return m_BrowserPreviewTab; }
00220     virtual BOOL    UpdateApplyState()                          { return TRUE; }
00221     static  void    SetCurrentApplyNow(BOOL Val)                { m_CurrentApplyNow = Val;  }
00222     static  BOOL    GetCurrentApplyNow()                        { return m_CurrentApplyNow; }
00223     static  BOOL    GetApplyNow()                               { return m_ApplyNow;        }
00224     static  void    SetFrameGalleryOpen(BOOL Val)               { m_FrameGalleryOpen = Val;         } 
00225     static  void    SetChangeLayerState(BOOL Val)               { m_ChangeLayerState = Val;         }
00226     static  void    SetFrameDelayValueChanged(BOOL Val)         { m_FrameDelayValueChanged = Val;   }
00227     static  BOOL    GetFrameDelayValueChanged()                 { return m_FrameDelayValueChanged;  }
00228             void    SetIgnoreTextChangeMsg(BOOL Val)            { m_IgnoreTextChangeMsg = Val;      }
00229             BOOL    GetIgnoreTextChangeMsg()                    { return m_IgnoreTextChangeMsg;     } 
00230 
00231 protected:
00232     static  DialogTabOp *pPropertiesDlg;                // pointer to the main dialog box
00233     static  UINT32      m_Count;                        // The number of instances of this dialog.
00234     static  BOOL        m_IsManyDisplayed;              // Is many displayed in the Delay edit field.
00235             BOOL        m_NoFrameLayers;                // Does the spread have any frame layers present.
00236     static  BOOL        m_IncludeFramePropertiesTab;    // Is the frame properties tab required.
00237     static  BOOL        m_BrowserPreviewTab;            // This flag allows us to know when to exclude all other tabs.
00238     static  BOOL        m_InitMessage;                  // True if handling an init message
00239     static  BOOL        m_ApplyNow;                     // True if Apply now should be ungreyed 
00240     static  BOOL        m_CurrentApplyNow;
00241     static  List        GIFAnimationPropertyTabsList;   // List of animation tabs.
00242     static  BOOL        m_FrameGalleryOpen;             // Is the frame gallery open
00243     static  BOOL        m_ChangeLayerState;             // The layer state is being changed from within the frame gallery,
00244             BOOL        m_IgnoreTextChangeMsg;          // Flag to indicate when we wish to ignore all text change messages.
00245     static  BOOL        m_FrameDelayValueChanged;       // The delay value for a frame layer has changed.
00246 };
00247 
00248 
00249 /********************************************************************************************
00250 
00251 >   class FramePropertiesTab : public GIFAnimationPropertyTabs
00252 
00253     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00254     Created:    10/06/97
00255     Purpose:    Allows the user to set various Frame properties.
00256 
00257 ********************************************************************************************/
00258 
00259 class FramePropertiesTab : public GIFAnimationPropertyTabs
00260 {         
00261     CC_DECLARE_DYNCREATE( FramePropertiesTab )  
00262 public:
00263 
00264     FramePropertiesTab();
00265     ~FramePropertiesTab();
00266 
00267     virtual BOOL Init();                        
00268     virtual BOOL HandleMsg(DialogMsg* Msg);             // Function to handle the messages for this tab/pane window
00269     virtual BOOL InitSection();                         // Function to set up the values on this tab when being opened
00270     virtual BOOL CommitSection();                       // Function to commit the values on this tab on ok
00271     virtual BOOL UpdateLayerSection();                  // Called when layer-related UI needs updating
00272     virtual BOOL GreySection();                         // Called when the user has closed all documents
00273     virtual BOOL UngreySection();                       // Called when the user has opened a document
00274     virtual BOOL UpdateSection();                       // Called when the user has switched to a new document
00275     virtual CDlgResID GetPageID();                      // Return section/page id system
00276     virtual BOOL IsPropertyRequired();                  // Return True if required
00277             BOOL ChangeControlStatus(const BOOL Status, BOOL IgnoreOverlay = FALSE );   // used to grey/ungrey all controls
00278             BOOL ChangeLayerState();
00279     
00280 
00281 protected:
00282     BOOL ShowDetails();
00283     virtual BOOL UpdateApplyState();
00284     BOOL HavePropertiesChanged(Layer* pLayer, BOOL ValidateDelayValue = FALSE );    
00285     BOOL m_GreyStatus;                                  // Remember the state that we are currently in  
00286 }; 
00287 
00288 
00289 
00290 /********************************************************************************************
00291 
00292 >   class AnimationPropertiesTab : public GIFAnimationPropertyTabs
00293 
00294     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00295     Created:    10/06/97
00296     Purpose:    Allows the user to set various Animation properties.
00297     
00298 ********************************************************************************************/
00299 
00300 class AnimationPropertiesTab : public GIFAnimationPropertyTabs
00301 {         
00302     CC_DECLARE_DYNCREATE( AnimationPropertiesTab )  
00303 public:
00304 
00305     AnimationPropertiesTab();                               // Constructor
00306     ~AnimationPropertiesTab();                              // Destructor
00307 
00308     virtual BOOL Init();                        
00309     virtual BOOL HandleMsg(DialogMsg* Msg);                 // Function to handle the messages for this tab/pane window 
00310     virtual BOOL InitSection();                             // Function to set up the values on this tab when being opened
00311     virtual BOOL CommitSection();                           // Function to commit the values on this tab on ok
00312     virtual BOOL UpdateLayerSection();
00313     virtual BOOL GreySection();                             // Called when the user has closed all documents
00314     virtual BOOL UngreySection();                           // Called when the user has opened a document
00315     virtual BOOL UpdateSection();                           // Called when the user has switched to a new document
00316     virtual CDlgResID GetPageID();                          // Return section/page id system
00317     virtual BOOL IsPropertyRequired();                      // Return True if required
00318 
00319     BOOL    ChangeControlStatus(const BOOL Status);         // used to grey/ungrey all controls
00320     BOOL    SetGlobalDelay(Spread *pSpread, DWORD Delay);   // Set this global delay value in the frame layer/OILBitmap.
00321 
00322 protected:
00323     BOOL ShowDetails();
00324     virtual BOOL UpdateApplyState();
00325     BOOL HavePropertiesChanged(BOOL ValidateDelayValue = FALSE);
00326     BOOL m_GreyStatus;                                      // Remember the state that we are currently in              
00327 }; 
00328 
00329 
00330 
00331 /********************************************************************************************
00332 
00333 >   class AnimationColoursTab : public GIFAnimationPropertyTabs
00334 
00335     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00336     Created:    10/06/97
00337     Purpose:    Allows the user to set various Animation Colours.
00338     
00339 ********************************************************************************************/
00340 
00341 class AnimationColoursTab : public GIFAnimationPropertyTabs
00342 {         
00343     CC_DECLARE_DYNCREATE( AnimationColoursTab )  
00344 public:
00345 
00346     AnimationColoursTab();
00347     ~AnimationColoursTab();
00348 
00349     virtual BOOL Init();                        
00350     virtual BOOL HandleMsg(DialogMsg* Msg);                 // Function to handle the messages for this tab/pane window
00351     virtual BOOL InitSection();                             // Function to set up the values on this tab when being opened
00352     virtual BOOL CommitSection();                           // Function to commit the values on this tab on ok
00353     virtual BOOL UpdateLayerSection();                      // Called when layer-related UI needs updating
00354     virtual BOOL GreySection();                             // Called when the user has closed all documents
00355     virtual BOOL UngreySection();                           // Called when the user has opened a document
00356     virtual BOOL UpdateSection();                           // Called when the user has switched to a new document
00357     virtual CDlgResID GetPageID();                          // Return section/page id system
00358     virtual BOOL IsPropertyRequired();                      // Return True if required
00359     BOOL    ChangeControlStatus(const BOOL Status);
00360 
00361 private:
00362     BOOL ShowDetails();
00363     virtual BOOL UpdateApplyState();
00364     BOOL HavePropertiesChanged();
00365     BOOL m_GreyStatus;                                      // Remember the state that we are currently in
00366 }; 
00367 
00368 
00369 /********************************************************************************************
00370 
00371 >   class PreviewInBrowserTab : public GIFAnimationPropertyTabs
00372 
00373     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00374     Created:    10/06/97
00375     Purpose:    Allows the user to set various Animation Colours.
00376     
00377 ********************************************************************************************/
00378 
00379 class PreviewInBrowserTab : public GIFAnimationPropertyTabs
00380 {         
00381     CC_DECLARE_DYNCREATE( PreviewInBrowserTab )  
00382 public:
00383 
00384     static BOOL Declare();
00385 
00386     PreviewInBrowserTab();
00387     ~PreviewInBrowserTab();
00388 
00389     virtual BOOL Init();                        
00390     virtual BOOL HandleMsg(DialogMsg* Msg);                 // Function to handle the messages for this tab/pane window
00391     virtual BOOL InitSection();                             // Function to set up the values on this tab when being opened
00392     virtual BOOL CommitSection();                           // Function to commit the values on this tab on ok
00393     virtual BOOL UpdateLayerSection();                      // Called when layer-related UI needs updating
00394     virtual BOOL GreySection();                             // Called when the user has closed all documents
00395     virtual BOOL UngreySection();                           // Called when the user has opened a document
00396     virtual BOOL UpdateSection();                           // Called when the user has switched to a new document
00397     virtual CDlgResID GetPageID();                          // Return section/page id system
00398     virtual BOOL IsPropertyRequired();                      // Return True if required
00399             BOOL ChangeControlStatus(const BOOL Status);
00400             BOOL GetBrowserValues(BrowserPreviewOptions  *BrowserOptions);
00401 
00402 public:
00403     static BrowserBackground g_Background;
00404     static BOOL g_InfoInHtmlStub;
00405     static BOOL g_Imagemap;
00406 
00407 private:
00408     BOOL ShowDetails();
00409     virtual BOOL UpdateApplyState();
00410     BOOL HavePropertiesChanged();
00411     BOOL m_GreyStatus;                                      // Remember the state that we are currently in
00412 }; 
00413 
00414 
00415 
00416 /********************************************************************************************
00417 
00418 >   class AnimExOptns : public GIFAnimationPropertyTabsDlg
00419 
00420     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00421     Created:    10/06/97
00422     Purpose:    Invokes the Animation Export Options dialog. 
00423                 This is a two tab form of the GIFAnimationPropertyTabsDlg.
00424                 The two tabs present are:- Animation colours and the animation properties.
00425                     
00426 ********************************************************************************************/
00427 
00428 class AnimExOptns: public GIFAnimationPropertyTabsDlg
00429 {
00430     #define OPTOKEN_EXPORTGIFANIMTABSDLG        _T("OpenGifAnimTabsDlg")
00431 
00432     CC_DECLARE_DYNCREATE(AnimExOptns)
00433 
00434 public:
00435     AnimExOptns();                                  // Default constructor
00436     ~AnimExOptns();                                 // Destructor
00437     static  BOOL Init();                            // Register the OpDescriptor.
00438     void    Do(OpDescriptor * pOpDesc);             // 'Do' function
00439     virtual MsgResult Message(Msg* Message);        // Message handler
00440     static  OpState GetState(String_256*, OpDescriptor*) { return TRUE; }       // GetState function
00441 
00442 protected:
00443     static  CDlgMode Mode;          // Dialog box mode of operation (mode or modeless)
00444     static const CDlgResID IDD;     // Dialog box id
00445 };
00446 
00447 
00448 /*********************************************************************************************
00449 >   class BrowserPrvwChgdMsg : public Msg
00450 
00451     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00452     Created:    10/06/97
00453     Purpose:    Messages detailing specific changes to the Browsser preview properties.
00454 
00455 *********************************************************************************************/
00456 
00457 class BrowserPrvwChgdMsg : public Msg
00458 {
00459     CC_DECLARE_DYNAMIC(BrowserPrvwChgdMsg)
00460 
00461     public:
00462     
00463     enum BrowserPrvwPropState
00464     {
00465         PROPERTIES_CHANGED
00466     };
00467 
00468     BrowserPrvwPropState State;
00469 
00470     BrowserPrvwChgdMsg(BrowserPrvwPropState ThisState): State(ThisState) { /* empty */} 
00471 };
00472 
00473 /*  
00474 #else
00475 #pragma message("Skipping")
00476 */
00477 #endif // INC_PROPERTIESLAYERS
00478 
00479 //#pragma message("End of aprps.h")

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