aprps.cpp

Go to the documentation of this file.
00001 // $Id: aprps.cpp 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 #include "camtypes.h"
00100 
00101 //#include "barsdlgs.h" 
00102 //#include "document.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00103 //#include "docview.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00104 //#include "dialogop.h"  - in camtypes.h [AUTOMATICALLY REMOVED]
00105 //#include "optsres.h"  
00106 //#include "will.h"     
00107 //#include "resource.h" 
00108 //#include "spread.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00109 #include "sprdmsg.h"    
00110 #include "optsmsgs.h"   
00111 #include "layer.h"
00112 //#include "nev.h"      
00113 #include "sglayer.h"
00114 //#include "fixmem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00115 //#include "markn.h"
00116 //#include "jason.h"
00117 #include "layermsg.h"
00118 #include "aprps.h"
00119 //#include "gifdlg.h"
00120 //#include "app.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00121 
00122 //#include "will3.h"
00123 #include "prevwdlg.h"
00124 //#include "simon.h"
00125 //#include "bmpsdlgr.h"
00126 //#include "ollie.h"
00127 //#include "filtrres.h"
00128 #include "filedlgs.h"
00129 //#include "prevwres.h" 
00130 
00131 CC_IMPLEMENT_DYNCREATE  (GIFAnimationPropertyTabsDlg,   DialogTabOp)
00132 CC_IMPLEMENT_DYNCREATE  (FramePropertiesTab,            GIFAnimationPropertyTabs)
00133 CC_IMPLEMENT_DYNCREATE  (AnimationPropertiesTab,        GIFAnimationPropertyTabs)   
00134 CC_IMPLEMENT_DYNCREATE  (AnimationColoursTab,           GIFAnimationPropertyTabs)   
00135 CC_IMPLEMENT_DYNCREATE  (PreviewInBrowserTab,           GIFAnimationPropertyTabs)   
00136 CC_IMPLEMENT_DYNCREATE  (GIFAnimationPropertyTabs,      PropertyTabs)
00137 CC_IMPLEMENT_DYNCREATE  (AnimExOptns,                   GIFAnimationPropertyTabsDlg)
00138 CC_IMPLEMENT_DYNAMIC    (BrowserPrvwChgdMsg,            Msg)
00139 
00140 #define new CAM_DEBUG_NEW
00141 
00142 const   CDlgResID   GIFAnimationPropertyTabsDlg::IDD    = _R(IDD_PROPERTIES);       // Dialog box id
00143         CDlgMode    GIFAnimationPropertyTabsDlg::Mode   = MODELESS;             // This dialog is modeless
00144 
00145         const CDlgResID AnimExOptns::IDD = _R(IDD_OPTIONS_PROPERTIES);              // Dialog box id
00146         CDlgMode    AnimExOptns::Mode    = MODAL;                               // If the dialog is invoked through the options button on the export dialog,            
00147                                                                                 // then this dialog is modeless.                
00148 
00149 GIFAnimationPropertyTabs    *GIFAnimationPropertyTabsDlg::m_pGIFAnimationProperties      = NULL;    // pointer to the tab handling class
00150 GIFAnimationPropertyTabsDlg *GIFAnimationPropertyTabsDlg::m_pGIFAnimationPropertyTabsDlg = NULL; 
00151 
00152 
00153 List            GIFAnimationPropertyTabs::GIFAnimationPropertyTabsList;             // The global list of installed options tabs.
00154 DialogTabOp*    GIFAnimationPropertyTabs::pPropertiesDlg                = NULL;     // link to application options dialog class
00155 UINT32          GIFAnimationPropertyTabs::m_Count                       = 0;        // The number of instances of this dialog.
00156 BOOL            GIFAnimationPropertyTabs::m_IsManyDisplayed             = FALSE;    // Is many displayed in the Delay edit field.
00157 BOOL            GIFAnimationPropertyTabs::m_IncludeFramePropertiesTab   = TRUE;     // Should the frame properties tab be displayed.        
00158 BOOL            GIFAnimationPropertyTabs::m_BrowserPreviewTab           = FALSE;    // This flag allows us to know when to exclude all other tabs.
00159 
00160 // The following are used to open the specific tab in the options dialog box
00161 UINT32 GIFAnimationPropertyTabs::FramePropertiesTabNumber       = 0;                    // Tab number assigned to the frame properties tab.
00162 UINT32 GIFAnimationPropertyTabs::AnimationColoursTabNumber  = 1;                    // Tab number assigned to the animation colours tab.    
00163 UINT32 GIFAnimationPropertyTabs::AnimationPropertiesTabNumber   = 2;                    // Tab number assigned to the animation properties tab.
00164 UINT32 GIFAnimationPropertyTabs::PreviewInBrowserTabNumber  = 3;                    // Tab number assigned to the preview in browser tab.
00165 INT32  GIFAnimationPropertyTabsDlg::m_PageToOpen = -1;                              // The tab page to open at start up.
00166 BOOL GIFAnimationPropertyTabs::m_CurrentApplyNow = FALSE;
00167 BOOL GIFAnimationPropertyTabs::m_ApplyNow = FALSE;
00168 BOOL GIFAnimationPropertyTabs::m_InitMessage = FALSE;   
00169 BOOL GIFAnimationPropertyTabs::m_FrameGalleryOpen = TRUE;
00170 BOOL GIFAnimationPropertyTabs::m_ChangeLayerState = FALSE;
00171 BOOL GIFAnimationPropertyTabs::m_FrameDelayValueChanged = FALSE;
00172 
00173 //BrowserPreviewOptions PreviewInBrowserTab::t_BrowserOptions;
00174 BOOL                    PreviewInBrowserTab::g_InfoInHtmlStub   = TRUE;
00175 BOOL                    PreviewInBrowserTab::g_Imagemap         = TRUE;
00176 BrowserBackground       PreviewInBrowserTab::g_Background       = BROWSER_BGR_NONE;
00177 
00178 
00179 /*****************************************************************************************************************************************************
00180 
00181 >   GIFAnimationPropertyTabsDlg::GIFAnimationPropertyTabsDlg(): DialogTabOp(GIFAnimationPropertyTabsDlg::IDD, GIFAnimationPropertyTabsDlg::Mode) 
00182 
00183     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00184     Created:    10/06/97
00185     Inputs:     -
00186     Outputs:    -
00187     Returns:    -
00188     Purpose:    GIFAnimationPropertyTabsDlg default constructor. 
00189     
00190 ********************************************************************************************************************************************************/
00191 
00192 GIFAnimationPropertyTabsDlg::GIFAnimationPropertyTabsDlg(): DialogTabOp(GIFAnimationPropertyTabsDlg::IDD, GIFAnimationPropertyTabsDlg::Mode,
00193                                                                         CC_RUNTIME_CLASS(DialogOp), GIFAnimationPropertyTabsDlg::GetPageToOpen())
00194 {
00195     if (m_pGIFAnimationProperties)
00196     {
00197         m_pGIFAnimationProperties->SetApplyNowState(FALSE);     // grey the apply now button
00198         m_pGIFAnimationProperties->SetInitMessageState(FALSE);  // not sending an init message
00199 
00200         // The Document and spread we are supposed to be working on. 
00201         m_pGIFAnimationProperties->pScopeDocument = NULL;           
00202         m_pGIFAnimationProperties->SetCurrentDocAndSpread(NULL);        
00203 
00204         //Increment the count, as another instance of the dialog has been created.
00205         UINT32 Val=1;
00206         m_pGIFAnimationProperties->IncCount(Val);
00207 
00208         // Create a static link to this dialog class.
00209         m_pGIFAnimationPropertyTabsDlg = this;
00210     }
00211 }
00212 
00213 
00214 /*****************************************************************************************************************************************************
00215 
00216 >   GIFAnimationPropertyTabsDlg::GIFAnimationPropertyTabsDlg(): DialogTabOp(GIFAnimationPropertyTabsDlg::IDD, GIFAnimationPropertyTabsDlg::Mode) 
00217 
00218     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00219     Created:    10/06/97
00220     Inputs:     -
00221     Outputs:    -
00222     Returns:    -
00223     Purpose:    GIFAnimationPropertyTabsDlg constructor. 
00224                 This allows us to specify a new dialog resource id and a different mode. 
00225                 This constructor is overloaded since if the dialog is invoked through the options button 
00226                 on the GIF Export options dialog, then we need to specify a different resouce ID and make the dialog MODAL.
00227     
00228 ********************************************************************************************************************************************************/
00229 
00230 GIFAnimationPropertyTabsDlg::GIFAnimationPropertyTabsDlg(CDlgResID DialogResID, CDlgMode Mode): DialogTabOp(DialogResID, Mode,
00231                                                                         CC_RUNTIME_CLASS(DialogOp), GIFAnimationPropertyTabsDlg::GetPageToOpen())
00232 {
00233     if (m_pGIFAnimationProperties)
00234     {
00235         m_pGIFAnimationProperties->SetApplyNowState(FALSE);     // grey the apply now button
00236         m_pGIFAnimationProperties->SetInitMessageState(FALSE);  // not sending an init message
00237 
00238         // The Document and spread we are supposed to be working on. 
00239         m_pGIFAnimationProperties->pScopeDocument = NULL;           
00240         m_pGIFAnimationProperties->SetCurrentDocAndSpread(NULL);        
00241 
00242         //Increment the count, as another instance of the dialog has been created.
00243         UINT32 Val=1;
00244         m_pGIFAnimationProperties->IncCount(Val);
00245 
00246         // Create a static link to this dialog class.
00247         m_pGIFAnimationPropertyTabsDlg = this;
00248     }
00249 }
00250 
00251 /******************************************************************************************
00252 
00253 >   GIFAnimationPropertyTabsDlg::~GIFAnimationPropertyTabsDlg()
00254     
00255     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00256     Created:    10/06/97
00257     Inputs:     -
00258     Outputs:    -
00259     returns:    - 
00260     Purpose:    GIFAnimationPropertyTabsDlg destructor.
00261 
00262 ******************************************************************************************/
00263 
00264 GIFAnimationPropertyTabsDlg::~GIFAnimationPropertyTabsDlg()
00265 {
00266     // Ensure we have a valid ptr.
00267     if (m_pGIFAnimationProperties)
00268     {
00269         // Remove the link to the options tabs if all the dialogs have been closed. 
00270         if(m_pGIFAnimationProperties->GetCount() < 1)
00271         {
00272             // Remove the options tabs link to the dialog box class.
00273             m_pGIFAnimationProperties->SetTabbedDlg(NULL);
00274         }
00275 
00276         // A dialog has been destroyed, therefore decrement m_count.
00277         UINT32 Count =1;
00278         m_pGIFAnimationProperties->DecCount(Count);
00279 
00280         // Kill the static link to this dialog class.
00281         m_pGIFAnimationPropertyTabsDlg = NULL;
00282 
00283         // Set this flag to FALSE.
00284         m_pGIFAnimationProperties->SetCurrentApplyNow(FALSE);
00285     }
00286 }
00287 
00288 /********************************************************************************************
00289 
00290 >   BOOL GIFAnimationPropertyTabsDlg::CommitDialogValues()
00291 
00292     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00293     Created:    10/06/97
00294     Inputs:     -
00295     Outputs:    -
00296     Returns:    True if values in dialog box ok, False otherwise.     
00297     Purpose:    Takes the values in the dialog box and sets the return values accordingly
00298                 Called when ok is pressed on the dialog box.
00299 
00300 *********************************************************************************************/
00301 
00302 BOOL GIFAnimationPropertyTabsDlg::CommitDialogValues()
00303 {
00304     // Ok has been pressed so take the values from the dialog box.
00305     BOOL ok = TRUE;
00306     BOOL ValuesOk = TRUE;
00307 
00308     // Make sure we work on the correct document and spread.
00309     Document *pDocument = Document::GetSelected();
00310     m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00311 
00312     // Tell all the tabs to commit their values.
00313     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00314 
00315     // Continue while we have a valid tab ptr.
00316     while (pGIFAnimationPropertyTabs != NULL)
00317     {
00318         // Only get the tab to commit if it is in use.
00319         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00320         {
00321             // Get the found page to commit its values.
00322             ok = pGIFAnimationPropertyTabs->CommitSection();
00323             if ( ok != TRUE)
00324             {
00325                 if (ok == 2)
00326                     InformError();      
00327 
00328                 // Carry on with other pages.
00329                 ValuesOk = FALSE;   
00330             }
00331             // Set the apply now flag to FALSE.
00332             pGIFAnimationPropertyTabs->SetApplyNowState(FALSE);
00333 
00334             // Grey yhe apply now/ok/Cancel buttons.
00335             pGIFAnimationPropertyTabs->GreyApplyNow();  
00336         }
00337         // Get the next option's tab.
00338         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00339     }
00340 
00341     // Return whether we found bad values or not.
00342     return ValuesOk;
00343 }
00344 
00345 /*********************************************************************************************************************
00346 
00347 >   MsgResult GIFAnimationPropertyTabsDlg::Message(Msg* Message)
00348     
00349     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00350     Created:    10/06/97
00351     Inputs:     -
00352     Outputs:    -
00353     Returns:    OK            Message handled ok.
00354                 FAIL          Something terrible happened whilst processing the message.
00355                 EAT_MSG       The Message was handled ok but don't send it to any more MessageHandlers. 
00356         
00357 *************************************************************************************************************************/
00358 
00359 MsgResult GIFAnimationPropertyTabsDlg::Message(Msg* Message)
00360 {
00361     ERROR3IF(Message == NULL,"GIFAnimationPropertyTabsDlg::Message NULL message received");
00362     ERROR3IF(m_pGIFAnimationProperties == NULL,"GIFAnimationPropertyTabsDlg::Message no m_pGIFAnimationProperties ptr");
00363     
00364     // Cope with document changing messages. 
00365     if (MESSAGE_IS_A(Message, DocChangingMsg))
00366     {
00367         DocChangingMsg *TheMsg = (DocChangingMsg *) Message;
00368 
00369         switch ( TheMsg->State )
00370         {
00371             case DocChangingMsg::SELCHANGED:
00372             {
00373                 // In different cases we use different document pointers.
00374                 Document *pDocument = NULL;
00375                 if (TheMsg->State == DocChangingMsg::TITLECHANGED)
00376                 {
00377                     // Document title has changed message.
00378                     pDocument = TheMsg->pChangingDoc;
00379                 }
00380                 else
00381                 {
00382                     // Document selection changed.
00383                     pDocument = TheMsg->pNewDoc;
00384                 }
00385                             
00386                 // Make sure that the tabs know what is the current document and spread to work on.
00387                 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00388 
00389                 // Ensure correct current document units.
00390                 m_pGIFAnimationProperties->SetUpDocUnits();
00391 
00392                 // Is there a new document.
00393                 if (pDocument == NULL)
00394                 {
00395                     // Make sure all the tabs update themselves.
00396                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00397 
00398                     while (pGIFAnimationPropertyTabs != NULL)
00399                     {
00400                         // Only get the tab to update if it is in use.
00401                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00402                         {
00403                             // Get that tab to update itself.
00404                             pGIFAnimationPropertyTabs->GreySection();
00405                         }
00406 
00407                         // Get the next option's tab.
00408                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00409                     }
00410                 }
00411                 else
00412                 {
00413                     // Make sure all the tabs update themselves.
00414                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00415 
00416                     while (pGIFAnimationPropertyTabs != NULL)
00417                     {
00418                         // Only get the tab to update if it is currently in use.
00419                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00420                         {
00421                             // Get this tab to update itself.
00422                             pGIFAnimationPropertyTabs->UngreySection();
00423                         }
00424                         // Get the next option's tab.
00425                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00426                     }
00427                 }
00428             }
00429             break;
00430             
00431             // This message is sent when a new or just opened document is stable.
00432             case DocChangingMsg::BORNANDSTABLE:
00433             {
00434                 // Get the changing document pointer.
00435                 Document *pDocument = NULL;
00436                 pDocument = TheMsg->pChangingDoc;
00437                 if (pDocument != NULL)
00438                 {
00439                     // Ensure all the tabs update themsleves.
00440                     m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00441 
00442                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00443 
00444                     while (pGIFAnimationPropertyTabs != NULL)
00445                     {
00446                         // Only get the tab to update if it is in use
00447                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00448                         {
00449                             // Get that tab to update itself.
00450                             pGIFAnimationPropertyTabs->UpdateSection();
00451                         }
00452 
00453                         // Get the next options tab.
00454                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00455                     }
00456                 }
00457             }
00458             break;
00459 
00460             default:
00461                 break;
00462         }
00463     }
00464 
00465     // Cope with document view changing messages so that we allow all the tabs to update themselves when switching to a new view.
00466     if (MESSAGE_IS_A(Message, DocViewMsg))
00467     {
00468         DocViewMsg *TheMsg = (DocViewMsg *) Message;
00469 
00470         switch ( TheMsg->State )
00471         {
00472             case DocViewMsg::SELCHANGED:
00473             {
00474                 if (TheMsg->pNewDocView != NULL)
00475                 {
00476                     // Ensure all the tabs update themsleves.
00477                     Document *pDocument = TheMsg->pNewDocView->GetDoc();
00478                     m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00479 
00480                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00481 
00482                     while (pGIFAnimationPropertyTabs != NULL)
00483                     {
00484                         // Only get the tab to update if it is in use.
00485                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00486                         {
00487                             // Get that tab to update itself.
00488                             pGIFAnimationPropertyTabs->UpdateSection();
00489                         }
00490 
00491                         // Get the next option's tab.
00492                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00493                     }
00494                 }
00495             }
00496             break;
00497 
00498             default:
00499                 break;
00500         }
00501     }
00502 
00503     // Cope with document view changing messages so that we allow all the tabs to update themselves when switching to a new view.
00504     if (MESSAGE_IS_A(Message, SpreadMsg))
00505     {
00506         SpreadMsg *TheMsg = (SpreadMsg *) Message;
00507 
00508         switch ( TheMsg->Reason )
00509         {
00510             // The selected spread has changed
00511             case SpreadMsg::SELCHANGED:
00512             {
00513                 if (TheMsg->pNewSpread != NULL)
00514                 {
00515                     // Ensure all the tabs update themselves.
00516                     Document *pDocument = (Document *)TheMsg->pNewSpread->FindOwnerDoc();
00517                     m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00518 
00519                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00520 
00521                     while (pGIFAnimationPropertyTabs != NULL)
00522                     {
00523                         // Only get the tab to update if it is in use.
00524                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00525                         {
00526                             // Get that tab to update itself.
00527                             pGIFAnimationPropertyTabs->UpdateLayerSection();
00528                         }
00529 
00530                         // Get the next option's tab.
00531                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00532                     }
00533                 }
00534             }
00535             break;
00536 
00537             case SpreadMsg::ANIMATIONPROPERTIESCHANGED:
00538             {
00539                 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00540 
00541                     while (pGIFAnimationPropertyTabs != NULL)
00542                     {
00543                         // Only get the tab to update if it is in use.
00544                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00545                         {
00546                             // Get that tab to update itself.
00547                             pGIFAnimationPropertyTabs->UpdateLayerSection();
00548                         }
00549                         // Get the next option's tab.
00550                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00551                     }
00552             }
00553             break;
00554 
00555             default:
00556                 break;
00557         }
00558     }
00559 
00560     // Handle a layer changing message.
00561     if (MESSAGE_IS_A(Message, LayerMsg))
00562     {
00563         LayerMsg *TheMsg = (LayerMsg *) Message;
00564 
00565         switch ( TheMsg->Reason )
00566         {
00567             // The active layer has changed.
00568             case LayerMsg::ACTIVE_LAYER_CHANGED:
00569             {
00570                 if (TheMsg->pNewLayer != NULL)
00571                 {
00572                     // Ensure all the tabs update themsleves.
00573                     m_pGIFAnimationProperties->SetActiveLayer(TheMsg->pNewLayer);
00574 
00575                     // While Loop flag.
00576 //                  BOOL FoundPage = FALSE;
00577 
00578                     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00579 
00580                     while (pGIFAnimationPropertyTabs != NULL)
00581                     {
00582                         //  Get the page Id.
00583                         CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00584 
00585                         // For Layer messages we only update the frame properties tab.
00586                         if (PageId == _R(IDD_TAB_FRAME_PROPERTIES) || PageId == _R(IDD_TAB_ANIMATION_PROPERTIES))
00587                         {
00588                             // Only get the tab to update if it is in use.
00589                             if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00590                             {
00591                                 // Get that tab to update itself.
00592                                 pGIFAnimationPropertyTabs->UpdateLayerSection();
00593 
00594                                 // Exit the while loop 
00595                             //  FoundPage = TRUE;
00596                             }
00597                         }
00598                         // Get the next option's tab.
00599                         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00600                     }
00601                 }
00602             }
00603             break;
00604 
00605             // The active layer has been updated.
00606             case LayerMsg::UPDATE_ACTIVE_LAYER:
00607             {
00608                 // While Loop flag.
00609                 BOOL FoundPage = FALSE;
00610 
00611                 // Ensure all the tabs update themsleves.
00612                 m_pGIFAnimationProperties->SetActiveLayer(TheMsg->pNewLayer);
00613 
00614                 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00615 
00616                 while (pGIFAnimationPropertyTabs != NULL && !FoundPage)
00617                 {
00618                     //  Get the page Id.
00619                     CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00620 
00621                     // For Layer messages we only update the frame properties tab.
00622                     if (PageId == _R(IDD_TAB_FRAME_PROPERTIES))
00623                     {
00624                         // Only get the tab to update if it is in use.
00625                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00626                         {
00627                             // Get that tab to update itself.
00628                             pGIFAnimationPropertyTabs->UpdateLayerSection();
00629 
00630                             // Exit the loop.
00631                             FoundPage = TRUE;
00632                         }
00633                     }
00634                     // Get the next option's tab.
00635                     pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00636                 }
00637                 break;
00638             }
00639             default:
00640                 break;
00641         }
00642     }
00643 
00644     // The Browser Preview options have changed.
00645     if (MESSAGE_IS_A(Message, BrowserPrvwChgdMsg))
00646     {
00647         BrowserPrvwChgdMsg *TheMsg = (BrowserPrvwChgdMsg *) Message;
00648 
00649         switch ( TheMsg->State )
00650         {
00651             case BrowserPrvwChgdMsg::PROPERTIES_CHANGED:
00652             {
00653                 // The properties have changed, so update the Browser preview tab.
00654 
00655                 // While Loop flag.
00656                 BOOL FoundPage = FALSE;
00657 
00658                 // Get a ptr to the first tab.
00659                 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00660 
00661                 // Loop untill we get aptr to the Preview in browser tab.
00662                 while (pGIFAnimationPropertyTabs != NULL && !FoundPage)
00663                 {
00664                     //  Get the page Id.
00665                     CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00666 
00667                     // For bitmap preview properties changed messages we only update the Browser preview tab.
00668                     if (PageId == _R(IDD_TAB_PREVIEW_IN_BROWSER))
00669                     {
00670                         // Only get the tab to update if it is in use.
00671                         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00672                         {
00673                             // Get that tab to update itself.
00674                             pGIFAnimationPropertyTabs->UpdateLayerSection();
00675 
00676                             // Exit the while loop 
00677                             FoundPage = TRUE;
00678                         }
00679                     }
00680                     // Get the next option's tab.
00681                     pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00682                 }
00683                 break;
00684             }
00685             default:
00686                 break;
00687         }
00688     }
00689 
00690     // Handle messages for the dialog box.
00691     if (IS_OUR_DIALOG_MSG(Message))
00692     {
00693         DialogMsg* Msg = (DialogMsg*)Message;
00694 
00695         MsgResult Result;
00696 
00697         // Main handler for dialog type messages
00698         BOOL EndDialog = FALSE;                                         // TRUE if we should quit the dialog
00699         BOOL CommitValues = FALSE;                                      // TRUE if we should commit the dialog values
00700         /*BOOL OldApplyNow =*/ m_pGIFAnimationProperties->GetApplyNowState();   // Old ApplyNow button state  
00701 
00702         // Make sure that the tabs know what is the current document and spread to work on.
00703         Document *pDocument = Document::GetSelected();
00704         m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00705 
00706         // Make sure that the current document units are correct.
00707         m_pGIFAnimationProperties->SetUpDocUnits();
00708             
00709         // Check if sending init/create message and if so set flag True.
00710         // If True then do not ungrey the ApplyNow button on changing messages
00711         if (Msg->DlgMsg == DIM_CREATE)
00712             m_pGIFAnimationProperties->SetInitMessageState(TRUE);               
00713 
00714         // If the message is not for the main winndow then try the tab pages.
00715         BOOL FoundPage = FALSE;
00716 
00717         if (Msg->PageID != 0)
00718         {
00719             //Go through all the tabs declared to the system and see if the message is for that page.
00720             GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00721 
00722             while (pGIFAnimationPropertyTabs != NULL&& !FoundPage)
00723             {
00724                 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00725                 if (PageId == Msg->PageID)
00726                 {
00727                     // Found the correct page so stop the search and send the message to that page
00728                     pGIFAnimationPropertyTabs->HandleMsg(Msg);
00729                     FoundPage = TRUE;
00730                 }
00731                 // Get the next tab.
00732                 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);                           
00733             }
00734         }   
00735         else
00736         {
00737             // Main page window
00738             switch (Msg->DlgMsg)
00739             {
00740                 case DIM_CREATE:
00741                     if (Msg->DlgMsg == DIM_CREATE)                  
00742                     {
00743                         //  When the dialog first starts up, only the first tab is initialised. When you change a value
00744                         //  on this tab and press ok/apply, this causes problems.
00745                         //  So, make sure that all the tabs are created
00746                         GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00747 
00748                         while (pGIFAnimationPropertyTabs != NULL)
00749                         {
00750                             //  Send the message to the page
00751                             pGIFAnimationPropertyTabs->HandleMsg(Msg);
00752                         
00753                             //  Get the next tab.
00754                             pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00755                         }
00756                     }
00757                     break;
00758 
00759                 case DIM_COMMIT:        
00760                     EndDialog = TRUE;
00761                     CommitValues = TRUE;
00762                 break;
00763 
00764                 case DIM_SOFT_COMMIT:   
00765                 {
00766                     CommitValues = TRUE;
00767                     m_pGIFAnimationProperties->SetApplyNowState(TRUE);
00768                 }
00769                 break;
00770 
00771                 case DIM_CANCEL:        
00772                 {
00773                     EndDialog = TRUE;
00774                 }
00775                 break;
00776 
00777                 default:
00778                     break;
00779                 }
00780             }
00781 
00782         // Commit values here.
00783         if (CommitValues)
00784         {
00785             BOOL ok = CommitDialogValues();
00786             if (!ok)
00787             {
00788                 EndDialog = FALSE;  
00789             }
00790         }
00791 
00792         // Pass the message back to the Base class.
00793         Result = DialogTabOp::Message(Message);
00794 
00795         // End dialog here
00796         if (EndDialog) 
00797         {
00798             // We can only look at static variables here
00799             // Remove the link to the options tabs if all dialogs have been cloosed. 
00800             if(m_pGIFAnimationProperties->GetCount() < 1)
00801             {
00802                 // Make sure that we remove our options tabs link to the dialog box class as the dialog will now be destroyed.
00803                 m_pGIFAnimationProperties->SetTabbedDlg(NULL);
00804             }
00805             return OK;
00806         }
00807         
00808         // Check if we have been sending an init/create message, if so then set the flag False.
00809         if (Msg->DlgMsg == DIM_CREATE)
00810             m_pGIFAnimationProperties->SetInitMessageState(FALSE);              
00811                     
00812         return Result;
00813     }
00814     return DialogTabOp::Message(Message);
00815 }
00816 
00817 /***************************************************************************************************************
00818 
00819   > OpState GIFAnimationPropertyTabsDlg::GetState(String_256*, OpDescriptor*)
00820 
00821     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00822     Created:    10/06/97
00823     Inputs:     -
00824     Outputs:    -
00825     Returns:    -
00826     Purpose:    GIFAnimationPropertyTabsDlg GetState method.
00827 
00828 ****************************************************************************************************************/
00829 
00830 OpState GIFAnimationPropertyTabsDlg::GetState(String_256*, OpDescriptor*)
00831 {    
00832     OpState OpSt;
00833 
00834     // If the pointer is non-null grey the menu option. 
00835     if (m_pGIFAnimationProperties && m_pGIFAnimationProperties->GetTabbedDlg() != NULL)
00836         OpSt.Greyed = TRUE;
00837     
00838     return(OpSt);
00839 }
00840 
00841 /******************************************************************************************
00842 
00843 >   BOOL GIFAnimationPropertyTabsDlg::Init()
00844 
00845     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00846     Created:    10/06/97
00847     Inputs:     -
00848     Outputs:    -
00849     Returns:    -
00850     
00851 ******************************************************************************************/
00852 
00853 BOOL GIFAnimationPropertyTabsDlg::Init()
00854 {
00855     BOOL InitOK;
00856 
00857     // Register ourselves with the dialog system.
00858     InitOK = RegisterOpDescriptor(
00859                                 0,                                                          // Tool ID                                                              
00860                                 _R(IDS_ANIMATION_TAB_DLG),                                      // String resource ID
00861                                 CC_RUNTIME_CLASS(GIFAnimationPropertyTabsDlg),              // Runtime class
00862                                 OPTOKEN_GIFANIMPROPERTYTABS,                                // Token string
00863                                 GetState,                                                   // GetState function
00864                                 0,                                                          // help ID
00865                                 0,                                                          // bubble help
00866                                 0, //_R(IDD_BARCONTROLSTORE),                                   // resource ID
00867                                 0, //_R(IDC_BTN_OPTIONSDLG),                                    // control ID
00868                                 SYSTEMBAR_ILLEGAL,                                          // Bar ID
00869                                 TRUE,                                                       // Recieve system messages
00870                                 FALSE,                                                      // Smart duplicate operation
00871                                 TRUE,                                                       // Clean operation
00872                                 0,                                                          // No vertical counterpart
00873                                 _R(IDS_ANIMATION_TAB_DLG_ONE),                                  // String for one copy only error
00874                                 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC)   // Auto state flags
00875                                 );
00876 
00877     // Set up any animation property tabs that are required and get a link to them.
00878     InitOK = InitOK && GIFAnimationPropertyTabs::InitGIFAnimationPropertyTabs();    
00879     m_pGIFAnimationProperties = GIFAnimationPropertyTabs::GetFirst();
00880 
00881     return (InitOK);
00882 }
00883 
00884 
00885 /******************************************************************************************
00886 
00887 >   void GIFAnimationPropertyTabsDlg::Deinit()
00888 
00889     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00890     Created:    10/06/97
00891     Inputs:     -
00892     Outputs:    -
00893     Returns:    -
00894     
00895 ******************************************************************************************/
00896 
00897 void GIFAnimationPropertyTabsDlg::Deinit()
00898 {
00899     // Remove all options tabs which have been declared to the system.
00900     GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs(); 
00901     m_pGIFAnimationProperties = NULL;
00902 }
00903 
00904 
00905 /******************************************************************************************
00906 
00907 >   void GIFAnimationPropertyTabsDlg::Do(OpDescriptor*)
00908 
00909     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00910     Created:    10/06/97
00911     Inputs:     -
00912     Outputs:    -
00913     Returns:    -
00914     Purpose:    Creates then opens the dialog in response to a request from the user.
00915     
00916 ******************************************************************************************/
00917 
00918 void GIFAnimationPropertyTabsDlg::Do(OpDescriptor*)
00919 {
00920     BOOL ok = FALSE;
00921 
00922     if (m_pGIFAnimationProperties == NULL)
00923     {
00924         // Could not create the dialog box.
00925         ERROR3("GIFAnimationPropertyTabsDlg::Do no AnimationProperties present");
00926         End();
00927     }
00928 
00929     //Set up the name that the main dialog page will use.
00930     String_256 Temp(_R(IDS_ANIMATION_TAB_DLG)); 
00931     TitleString = Temp;
00932     SetName(&TitleString);
00933     
00934     // Make sure that our options tabs have a link to the dialog box class
00935     GIFAnimationPropertyTabs::SetTabbedDlg(this);
00936 //  m_pGIFAnimationProperties->SetApplyNowState(TRUE);
00937 
00938     // Force the dialog box to be created, as it is non-modal it must be opened if the create works ok.
00939     ok = Create();      
00940 
00941     // Make sure we know the current document and spread to work on.
00942     Document *pDocument = Document::GetSelected();
00943     m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00944 
00945     if ( ok )
00946     {
00947         Open(); 
00948 
00949         // Grey out the apply now button. 
00950         m_pGIFAnimationProperties->SetInitMessageState(FALSE);
00951         m_pGIFAnimationProperties->SetApplyNowState(FALSE);
00952         m_pGIFAnimationProperties->GreyApplyNow();      
00953     }
00954     else
00955     {
00956         // Something went wrong!
00957         InformError();              
00958         End();                      
00959     }                   
00960 }
00961 
00962 /******************************************************************************************
00963 
00964 >   BOOL GIFAnimationPropertyTabsDlg::RegisterYourPagesInOrderPlease()
00965 
00966     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
00967     Created:    10/06/97
00968     Inputs:     -
00969     Outputs:    -
00970     Returns:    return TRUE if all calls to AddAPage returned TRUE, else FALSE
00971     Purpose:    This function will get called to give us  a chance to add our 
00972                 pages to the DialogTabOp. 
00973 
00974 ******************************************************************************************/
00975 
00976 BOOL GIFAnimationPropertyTabsDlg::RegisterYourPagesInOrderPlease()
00977 {
00978     BOOL ok = TRUE;
00979 
00980     // Get the first tab.
00981     GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00982 
00983     while (pGIFAnimationPropertyTabs != NULL)
00984     {
00985         if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00986         {
00987             CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00988             ok = ok && AddAPage(PageId);
00989         }
00990 
00991         // Get next.
00992         pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00993     }
00994 
00995     return (ok); 
00996 }
00997 
00998 /******************************************************************************************
00999 
01000 >   GIFAnimationPropertyTabs * GIFAnimationPropertyTabsDlg::GetLayerPropertiesTabs()
01001 
01002     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01003     Created:    10/06/97
01004     Inputs:     -
01005     Outputs:    -
01006     Returns:    Pointer to the animation property tabs handling class.
01007     
01008 ******************************************************************************************/
01009 
01010 GIFAnimationPropertyTabs * GIFAnimationPropertyTabsDlg::GetGIFAnimationPropertiesTabs()
01011 {
01012     return m_pGIFAnimationProperties;
01013 }
01014 
01015 /********************************************************************************************
01016 
01017 >   GIFAnimationPropertyTabs::GIFAnimationPropertyTabs()
01018     
01019     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01020     Created:    10/06/97
01021     Purpose:    Constructor.
01022 
01023 ********************************************************************************************/
01024 
01025 GIFAnimationPropertyTabs::GIFAnimationPropertyTabs()
01026 {
01027     pPropertiesDlg              = NULL;
01028     m_NoFrameLayers             = FALSE;    
01029     m_IgnoreTextChangeMsg       = FALSE;
01030 }
01031 
01032 
01033 /********************************************************************************************
01034 
01035 >   GIFAnimationPropertyTabs::Init()
01036 
01037     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01038     Created:    10/06/97
01039     
01040 ********************************************************************************************/
01041 
01042 BOOL GIFAnimationPropertyTabs::Init()
01043 {
01044     // Do nothing for now.
01045     return TRUE;
01046 }
01047 
01048 /******************************************************************************************/
01049 
01050 /******************************************************************************************/
01051 
01052 #define ADD_LAYERPROPERTY(Classname)                                                \
01053     /* Create, initialise and install the specified tab to the options system */    \
01054     pGIFAnimationProperty = new Classname;                                          \
01055     if (pGIFAnimationProperty == NULL) return FALSE;                                \
01056                                                                                     \
01057     if (!pGIFAnimationProperty->Init())                                             \
01058     {                                                                               \
01059         /* Error occured - report it and stop trying to initialise options tab. */  \
01060         delete pGIFAnimationProperty;                                               \
01061         InformError();                                                              \
01062         return TRUE;                                                                \
01063     }                                                                               \
01064                                                                                     \
01065     GIFAnimationPropertyTabsList.AddTail(pGIFAnimationProperty);
01066 
01067 /********************************************************************************************
01068 
01069 >   BOOL GIFAnimationPropertyTabs::InitGIFAnimationPropertyTabs()
01070 
01071     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01072     Created:    10/06/97
01073     Returns:    TRUE if initialised ok, FALSE if not.
01074     Purpose:    Scans all GIFAnimationPropertyTabs to find out which Tabs are available,
01075                 creates and holds them in a list.
01076 
01077 ********************************************************************************************/
01078 
01079 BOOL GIFAnimationPropertyTabs::InitGIFAnimationPropertyTabs()
01080 {
01081     //Find the Tabs.
01082     GIFAnimationPropertyTabs *pGIFAnimationProperty = NULL;
01083 
01084     ADD_LAYERPROPERTY(FramePropertiesTab)           // Frame Properties tab
01085     ADD_LAYERPROPERTY(AnimationColoursTab)          // Animation colours tab.
01086     ADD_LAYERPROPERTY(AnimationPropertiesTab)       // Animation properties tab                   
01087     ADD_LAYERPROPERTY(PreviewInBrowserTab)          // Preview in Browser tab.
01088 /*  
01089     // Loop variable.
01090     INT32 i = 0;
01091 
01092     // Go through the tabs declared to the system
01093     pGIFAnimationProperty = GIFAnimationPropertyTabs::GetFirst();
01094 
01095     while (pGIFAnimationProperty != NULL)
01096     {
01097         // Include the tab only if it is a document based option.
01098         if ( pGIFAnimationProperty->IsPropertyRequired() )
01099         {
01100             switch (pGIFAnimationProperty->GetPageID())
01101             {
01102                 case _R(IDD_TAB_FRAME_PROPERTIES):
01103                     FramePropertiesTabNumber = i;
01104                     break;
01105                 
01106                 case _R(IDD_TAB_ANIMATION_PROPERTIES):
01107                      AnimationPropertiesTabNumber = i;
01108                     break;                      
01109                     
01110                 case _R(IDD_TAB_ANIMATION_COLOURS):
01111                      AnimationColoursTabNumber = i;
01112                     break;                  
01113                     
01114                 case _R(IDD_TAB_PREVIEW_IN_BROWSER):
01115                      PreviewInBrowserTabNumber = i;
01116                     break;                  
01117         }   
01118             i++ ;
01119         }
01120         // Get the next tab.
01121         pGIFAnimationProperty = GIFAnimationPropertyTabs::GetNext(pGIFAnimationProperty);
01122     }
01123 */
01124     return TRUE;
01125 }   
01126 
01127 /********************************************************************************************
01128 
01129 >   static void GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs()
01130 
01131     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01132     Created:    10/06/97
01133     Purpose:    Destroy all the Tab objects.
01134     
01135 ********************************************************************************************/
01136 
01137 void GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs()
01138 {
01139 //  GIFAnimationPropertyTabs *pGIFAnimationProperty = NULL;
01140 
01141     // Remove all the Tabs.
01142     GIFAnimationPropertyTabsList.DeleteAll();
01143 
01144     return;
01145 }
01146 
01147 /********************************************************************************************
01148 
01149 >   BOOL GIFAnimationPropertyTabs::DeclareGIFAnimationProperty(GIFAnimationPropertyTabs *pGIFAnimationProperty)
01150 
01151     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01152     Created:    10/06/97
01153     Inputs:     A pointer to a new GIFAnimationPropertyTabs class.
01154     Returns:    True if tab declared, False if something went wrong. 
01155     Purpose:    Function to declare a new tab.
01156 
01157 ********************************************************************************************/
01158 
01159 BOOL GIFAnimationPropertyTabs::DeclareGIFAnimationProperty(GIFAnimationPropertyTabs *pGIFAnimationProperty)
01160 {
01161     if (pGIFAnimationProperty == NULL) return FALSE;
01162 
01163     if (!pGIFAnimationProperty->Init())
01164     {
01165         InformError();
01166         return TRUE;
01167     }
01168     GIFAnimationPropertyTabsList.AddTail(pGIFAnimationProperty);
01169     
01170     return TRUE;
01171 }
01172 
01173 /********************************************************************************************
01174 
01175 >   virtual DialogTabOp * GIFAnimationPropertyTabs::GetTabbedDlg()
01176 
01177     Author:     Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
01178     Created:    10/06/97
01179     Returns:    Pointer to the main dialog box used by this GIFAnimationPropertyTabs.       
01180     Purpose:    Let the base class know where the dialog box handling class is.
01181     
01182 ********************************************************************************************/
01183 
01184 DialogTabOp * GIFAnimationPropertyTabs::GetTabbedDlg()
01185 {
01186     // return a pointer to the main dialog box.
01187     return GIFAnimationProperty