00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 #include "camtypes.h"
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 #include "sprdmsg.h"
00110 #include "optsmsgs.h"
00111 #include "layer.h"
00112
00113 #include "sglayer.h"
00114
00115
00116
00117 #include "layermsg.h"
00118 #include "aprps.h"
00119
00120
00121
00122
00123 #include "prevwdlg.h"
00124
00125
00126
00127
00128 #include "filedlgs.h"
00129
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);
00143 CDlgMode GIFAnimationPropertyTabsDlg::Mode = MODELESS;
00144
00145 const CDlgResID AnimExOptns::IDD = _R(IDD_OPTIONS_PROPERTIES);
00146 CDlgMode AnimExOptns::Mode = MODAL;
00147
00148
00149 GIFAnimationPropertyTabs *GIFAnimationPropertyTabsDlg::m_pGIFAnimationProperties = NULL;
00150 GIFAnimationPropertyTabsDlg *GIFAnimationPropertyTabsDlg::m_pGIFAnimationPropertyTabsDlg = NULL;
00151
00152
00153 List GIFAnimationPropertyTabs::GIFAnimationPropertyTabsList;
00154 DialogTabOp* GIFAnimationPropertyTabs::pPropertiesDlg = NULL;
00155 UINT32 GIFAnimationPropertyTabs::m_Count = 0;
00156 BOOL GIFAnimationPropertyTabs::m_IsManyDisplayed = FALSE;
00157 BOOL GIFAnimationPropertyTabs::m_IncludeFramePropertiesTab = TRUE;
00158 BOOL GIFAnimationPropertyTabs::m_BrowserPreviewTab = FALSE;
00159
00160
00161 UINT32 GIFAnimationPropertyTabs::FramePropertiesTabNumber = 0;
00162 UINT32 GIFAnimationPropertyTabs::AnimationColoursTabNumber = 1;
00163 UINT32 GIFAnimationPropertyTabs::AnimationPropertiesTabNumber = 2;
00164 UINT32 GIFAnimationPropertyTabs::PreviewInBrowserTabNumber = 3;
00165 INT32 GIFAnimationPropertyTabsDlg::m_PageToOpen = -1;
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
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
00182
00183
00184
00185
00186
00187
00188
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);
00198 m_pGIFAnimationProperties->SetInitMessageState(FALSE);
00199
00200
00201 m_pGIFAnimationProperties->pScopeDocument = NULL;
00202 m_pGIFAnimationProperties->SetCurrentDocAndSpread(NULL);
00203
00204
00205 UINT32 Val=1;
00206 m_pGIFAnimationProperties->IncCount(Val);
00207
00208
00209 m_pGIFAnimationPropertyTabsDlg = this;
00210 }
00211 }
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
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);
00236 m_pGIFAnimationProperties->SetInitMessageState(FALSE);
00237
00238
00239 m_pGIFAnimationProperties->pScopeDocument = NULL;
00240 m_pGIFAnimationProperties->SetCurrentDocAndSpread(NULL);
00241
00242
00243 UINT32 Val=1;
00244 m_pGIFAnimationProperties->IncCount(Val);
00245
00246
00247 m_pGIFAnimationPropertyTabsDlg = this;
00248 }
00249 }
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264 GIFAnimationPropertyTabsDlg::~GIFAnimationPropertyTabsDlg()
00265 {
00266
00267 if (m_pGIFAnimationProperties)
00268 {
00269
00270 if(m_pGIFAnimationProperties->GetCount() < 1)
00271 {
00272
00273 m_pGIFAnimationProperties->SetTabbedDlg(NULL);
00274 }
00275
00276
00277 UINT32 Count =1;
00278 m_pGIFAnimationProperties->DecCount(Count);
00279
00280
00281 m_pGIFAnimationPropertyTabsDlg = NULL;
00282
00283
00284 m_pGIFAnimationProperties->SetCurrentApplyNow(FALSE);
00285 }
00286 }
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302 BOOL GIFAnimationPropertyTabsDlg::CommitDialogValues()
00303 {
00304
00305 BOOL ok = TRUE;
00306 BOOL ValuesOk = TRUE;
00307
00308
00309 Document *pDocument = Document::GetSelected();
00310 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00311
00312
00313 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00314
00315
00316 while (pGIFAnimationPropertyTabs != NULL)
00317 {
00318
00319 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00320 {
00321
00322 ok = pGIFAnimationPropertyTabs->CommitSection();
00323 if ( ok != TRUE)
00324 {
00325 if (ok == 2)
00326 InformError();
00327
00328
00329 ValuesOk = FALSE;
00330 }
00331
00332 pGIFAnimationPropertyTabs->SetApplyNowState(FALSE);
00333
00334
00335 pGIFAnimationPropertyTabs->GreyApplyNow();
00336 }
00337
00338 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00339 }
00340
00341
00342 return ValuesOk;
00343 }
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
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
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
00374 Document *pDocument = NULL;
00375 if (TheMsg->State == DocChangingMsg::TITLECHANGED)
00376 {
00377
00378 pDocument = TheMsg->pChangingDoc;
00379 }
00380 else
00381 {
00382
00383 pDocument = TheMsg->pNewDoc;
00384 }
00385
00386
00387 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00388
00389
00390 m_pGIFAnimationProperties->SetUpDocUnits();
00391
00392
00393 if (pDocument == NULL)
00394 {
00395
00396 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00397
00398 while (pGIFAnimationPropertyTabs != NULL)
00399 {
00400
00401 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00402 {
00403
00404 pGIFAnimationPropertyTabs->GreySection();
00405 }
00406
00407
00408 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00409 }
00410 }
00411 else
00412 {
00413
00414 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00415
00416 while (pGIFAnimationPropertyTabs != NULL)
00417 {
00418
00419 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00420 {
00421
00422 pGIFAnimationPropertyTabs->UngreySection();
00423 }
00424
00425 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00426 }
00427 }
00428 }
00429 break;
00430
00431
00432 case DocChangingMsg::BORNANDSTABLE:
00433 {
00434
00435 Document *pDocument = NULL;
00436 pDocument = TheMsg->pChangingDoc;
00437 if (pDocument != NULL)
00438 {
00439
00440 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00441
00442 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00443
00444 while (pGIFAnimationPropertyTabs != NULL)
00445 {
00446
00447 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00448 {
00449
00450 pGIFAnimationPropertyTabs->UpdateSection();
00451 }
00452
00453
00454 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00455 }
00456 }
00457 }
00458 break;
00459
00460 default:
00461 break;
00462 }
00463 }
00464
00465
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
00477 Document *pDocument = TheMsg->pNewDocView->GetDoc();
00478 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00479
00480 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00481
00482 while (pGIFAnimationPropertyTabs != NULL)
00483 {
00484
00485 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00486 {
00487
00488 pGIFAnimationPropertyTabs->UpdateSection();
00489 }
00490
00491
00492 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00493 }
00494 }
00495 }
00496 break;
00497
00498 default:
00499 break;
00500 }
00501 }
00502
00503
00504 if (MESSAGE_IS_A(Message, SpreadMsg))
00505 {
00506 SpreadMsg *TheMsg = (SpreadMsg *) Message;
00507
00508 switch ( TheMsg->Reason )
00509 {
00510
00511 case SpreadMsg::SELCHANGED:
00512 {
00513 if (TheMsg->pNewSpread != NULL)
00514 {
00515
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
00524 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00525 {
00526
00527 pGIFAnimationPropertyTabs->UpdateLayerSection();
00528 }
00529
00530
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
00544 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00545 {
00546
00547 pGIFAnimationPropertyTabs->UpdateLayerSection();
00548 }
00549
00550 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00551 }
00552 }
00553 break;
00554
00555 default:
00556 break;
00557 }
00558 }
00559
00560
00561 if (MESSAGE_IS_A(Message, LayerMsg))
00562 {
00563 LayerMsg *TheMsg = (LayerMsg *) Message;
00564
00565 switch ( TheMsg->Reason )
00566 {
00567
00568 case LayerMsg::ACTIVE_LAYER_CHANGED:
00569 {
00570 if (TheMsg->pNewLayer != NULL)
00571 {
00572
00573 m_pGIFAnimationProperties->SetActiveLayer(TheMsg->pNewLayer);
00574
00575
00576
00577
00578 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00579
00580 while (pGIFAnimationPropertyTabs != NULL)
00581 {
00582
00583 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00584
00585
00586 if (PageId == _R(IDD_TAB_FRAME_PROPERTIES) || PageId == _R(IDD_TAB_ANIMATION_PROPERTIES))
00587 {
00588
00589 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00590 {
00591
00592 pGIFAnimationPropertyTabs->UpdateLayerSection();
00593
00594
00595
00596 }
00597 }
00598
00599 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00600 }
00601 }
00602 }
00603 break;
00604
00605
00606 case LayerMsg::UPDATE_ACTIVE_LAYER:
00607 {
00608
00609 BOOL FoundPage = FALSE;
00610
00611
00612 m_pGIFAnimationProperties->SetActiveLayer(TheMsg->pNewLayer);
00613
00614 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00615
00616 while (pGIFAnimationPropertyTabs != NULL && !FoundPage)
00617 {
00618
00619 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00620
00621
00622 if (PageId == _R(IDD_TAB_FRAME_PROPERTIES))
00623 {
00624
00625 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00626 {
00627
00628 pGIFAnimationPropertyTabs->UpdateLayerSection();
00629
00630
00631 FoundPage = TRUE;
00632 }
00633 }
00634
00635 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00636 }
00637 break;
00638 }
00639 default:
00640 break;
00641 }
00642 }
00643
00644
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
00654
00655
00656 BOOL FoundPage = FALSE;
00657
00658
00659 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00660
00661
00662 while (pGIFAnimationPropertyTabs != NULL && !FoundPage)
00663 {
00664
00665 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00666
00667
00668 if (PageId == _R(IDD_TAB_PREVIEW_IN_BROWSER))
00669 {
00670
00671 if ( pGIFAnimationPropertyTabs->IsPropertyRequired() )
00672 {
00673
00674 pGIFAnimationPropertyTabs->UpdateLayerSection();
00675
00676
00677 FoundPage = TRUE;
00678 }
00679 }
00680
00681 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00682 }
00683 break;
00684 }
00685 default:
00686 break;
00687 }
00688 }
00689
00690
00691 if (IS_OUR_DIALOG_MSG(Message))
00692 {
00693 DialogMsg* Msg = (DialogMsg*)Message;
00694
00695 MsgResult Result;
00696
00697
00698 BOOL EndDialog = FALSE;
00699 BOOL CommitValues = FALSE;
00700 m_pGIFAnimationProperties->GetApplyNowState();
00701
00702
00703 Document *pDocument = Document::GetSelected();
00704 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00705
00706
00707 m_pGIFAnimationProperties->SetUpDocUnits();
00708
00709
00710
00711 if (Msg->DlgMsg == DIM_CREATE)
00712 m_pGIFAnimationProperties->SetInitMessageState(TRUE);
00713
00714
00715 BOOL FoundPage = FALSE;
00716
00717 if (Msg->PageID != 0)
00718 {
00719
00720 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00721
00722 while (pGIFAnimationPropertyTabs != NULL&& !FoundPage)
00723 {
00724 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
00725 if (PageId == Msg->PageID)
00726 {
00727
00728 pGIFAnimationPropertyTabs->HandleMsg(Msg);
00729 FoundPage = TRUE;
00730 }
00731
00732 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00733 }
00734 }
00735 else
00736 {
00737
00738 switch (Msg->DlgMsg)
00739 {
00740 case DIM_CREATE:
00741 if (Msg->DlgMsg == DIM_CREATE)
00742 {
00743
00744
00745
00746 GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
00747
00748 while (pGIFAnimationPropertyTabs != NULL)
00749 {
00750
00751 pGIFAnimationPropertyTabs->HandleMsg(Msg);
00752
00753
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
00783 if (CommitValues)
00784 {
00785 BOOL ok = CommitDialogValues();
00786 if (!ok)
00787 {
00788 EndDialog = FALSE;
00789 }
00790 }
00791
00792
00793 Result = DialogTabOp::Message(Message);
00794
00795
00796 if (EndDialog)
00797 {
00798
00799
00800 if(m_pGIFAnimationProperties->GetCount() < 1)
00801 {
00802
00803 m_pGIFAnimationProperties->SetTabbedDlg(NULL);
00804 }
00805 return OK;
00806 }
00807
00808
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
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830 OpState GIFAnimationPropertyTabsDlg::GetState(String_256*, OpDescriptor*)
00831 {
00832 OpState OpSt;
00833
00834
00835 if (m_pGIFAnimationProperties && m_pGIFAnimationProperties->GetTabbedDlg() != NULL)
00836 OpSt.Greyed = TRUE;
00837
00838 return(OpSt);
00839 }
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853 BOOL GIFAnimationPropertyTabsDlg::Init()
00854 {
00855 BOOL InitOK;
00856
00857
00858 InitOK = RegisterOpDescriptor(
00859 0,
00860 _R(IDS_ANIMATION_TAB_DLG),
00861 CC_RUNTIME_CLASS(GIFAnimationPropertyTabsDlg),
00862 OPTOKEN_GIFANIMPROPERTYTABS,
00863 GetState,
00864 0,
00865 0,
00866 0,
00867 0,
00868 SYSTEMBAR_ILLEGAL,
00869 TRUE,
00870 FALSE,
00871 TRUE,
00872 0,
00873 _R(IDS_ANIMATION_TAB_DLG_ONE),
00874 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC)
00875 );
00876
00877
00878 InitOK = InitOK && GIFAnimationPropertyTabs::InitGIFAnimationPropertyTabs();
00879 m_pGIFAnimationProperties = GIFAnimationPropertyTabs::GetFirst();
00880
00881 return (InitOK);
00882 }
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895
00896
00897 void GIFAnimationPropertyTabsDlg::Deinit()
00898 {
00899
00900 GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs();
00901 m_pGIFAnimationProperties = NULL;
00902 }
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918 void GIFAnimationPropertyTabsDlg::Do(OpDescriptor*)
00919 {
00920 BOOL ok = FALSE;
00921
00922 if (m_pGIFAnimationProperties == NULL)
00923 {
00924
00925 ERROR3("GIFAnimationPropertyTabsDlg::Do no AnimationProperties present");
00926 End();
00927 }
00928
00929
00930 String_256 Temp(_R(IDS_ANIMATION_TAB_DLG));
00931 TitleString = Temp;
00932 SetName(&TitleString);
00933
00934
00935 GIFAnimationPropertyTabs::SetTabbedDlg(this);
00936
00937
00938
00939 ok = Create();
00940
00941
00942 Document *pDocument = Document::GetSelected();
00943 m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
00944
00945 if ( ok )
00946 {
00947 Open();
00948
00949
00950 m_pGIFAnimationProperties->SetInitMessageState(FALSE);
00951 m_pGIFAnimationProperties->SetApplyNowState(FALSE);
00952 m_pGIFAnimationProperties->GreyApplyNow();
00953 }
00954 else
00955 {
00956
00957 InformError();
00958 End();
00959 }
00960 }
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976 BOOL GIFAnimationPropertyTabsDlg::RegisterYourPagesInOrderPlease()
00977 {
00978 BOOL ok = TRUE;
00979
00980
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
00992 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);
00993 }
00994
00995 return (ok);
00996 }
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010 GIFAnimationPropertyTabs * GIFAnimationPropertyTabsDlg::GetGIFAnimationPropertiesTabs()
01011 {
01012 return m_pGIFAnimationProperties;
01013 }
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025 GIFAnimationPropertyTabs::GIFAnimationPropertyTabs()
01026 {
01027 pPropertiesDlg = NULL;
01028 m_NoFrameLayers = FALSE;
01029 m_IgnoreTextChangeMsg = FALSE;
01030 }
01031
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041
01042 BOOL GIFAnimationPropertyTabs::Init()
01043 {
01044
01045 return TRUE;
01046 }
01047
01048
01049
01050
01051
01052 #define ADD_LAYERPROPERTY(Classname) \
01053 \
01054 pGIFAnimationProperty = new Classname; \
01055 if (pGIFAnimationProperty == NULL) return FALSE; \
01056 \
01057 if (!pGIFAnimationProperty->Init()) \
01058 { \
01059 \
01060 delete pGIFAnimationProperty; \
01061 InformError(); \
01062 return TRUE; \
01063 } \
01064 \
01065 GIFAnimationPropertyTabsList.AddTail(pGIFAnimationProperty);
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079 BOOL GIFAnimationPropertyTabs::InitGIFAnimationPropertyTabs()
01080 {
01081
01082 GIFAnimationPropertyTabs *pGIFAnimationProperty = NULL;
01083
01084 ADD_LAYERPROPERTY(FramePropertiesTab)
01085 ADD_LAYERPROPERTY(AnimationColoursTab)
01086 ADD_LAYERPROPERTY(AnimationPropertiesTab)
01087 ADD_LAYERPROPERTY(PreviewInBrowserTab)
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124 return TRUE;
01125 }
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137 void GIFAnimationPropertyTabs::DeinitGIFAnimationPropertyTabs()
01138 {
01139
01140
01141
01142 GIFAnimationPropertyTabsList.DeleteAll();
01143
01144 return;
01145 }
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
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
01176
01177
01178
01179
01180
01181
01182
01183
01184 DialogTabOp * GIFAnimationPropertyTabs::GetTabbedDlg()
01185 {
01186
01187 return GIFAnimationProperty