AnimExOptns Class Reference

Invokes the Animation Export Options dialog. This is a two tab form of the GIFAnimationPropertyTabsDlg. The two tabs present are:- Animation colours and the animation properties. More...

#include <aprps.h>

Inheritance diagram for AnimExOptns:

GIFAnimationPropertyTabsDlg DialogTabOp DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 AnimExOptns ()
 AnimExOptns constructor.
 ~AnimExOptns ()
 AnimExOptns destructor.
void Do (OpDescriptor *pOpDesc)
 Creates then opens the dialog in response to a request from the user.
virtual MsgResult Message (Msg *Message)

Static Public Member Functions

static BOOL Init ()
static OpState GetState (String_256 *, OpDescriptor *)
 GIFAnimationPropertyTabsDlg GetState method.

Static Protected Attributes

static CDlgMode Mode = MODAL
static const CDlgResID IDD = _R(IDD_OPTIONS_PROPERTIES)

Detailed Description

Invokes the Animation Export Options dialog. This is a two tab form of the GIFAnimationPropertyTabsDlg. The two tabs present are:- Animation colours and the animation properties.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97

Definition at line 428 of file aprps.h.


Constructor & Destructor Documentation

AnimExOptns::AnimExOptns  ) 
 

AnimExOptns constructor.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 4272 of file aprps.cpp.

04272                         :GIFAnimationPropertyTabsDlg(AnimExOptns::IDD, AnimExOptns::Mode)
04273 {
04274     // Base class does all the work.
04275 }

AnimExOptns::~AnimExOptns  ) 
 

AnimExOptns destructor.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS] returns: -

Definition at line 4291 of file aprps.cpp.

04292 {
04293     // As the dialog is dying, set this flag TRUE, therefore if the Full animation properties dialog is invoked, 
04294     // we will include all the tabs registered to the system.
04295 
04296     // Ensure the dialog still exists.
04297     if(m_pGIFAnimationProperties)
04298     {
04299         // Set any necessary flags to the correct state.
04300         m_pGIFAnimationProperties->SetIncludeFramePropertiesTab(TRUE);
04301         m_pGIFAnimationProperties->SetBrowserPreviewTab(FALSE); 
04302     }
04303 }


Member Function Documentation

void AnimExOptns::Do OpDescriptor pOpDesc  )  [virtual]
 

Creates then opens the dialog in response to a request from the user.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 4318 of file aprps.cpp.

04319 {
04320 //  BOOL ok = FALSE;
04321 
04322     if (m_pGIFAnimationProperties == NULL)
04323     {
04324         // Could not create the dialog box.
04325         ERROR3("GIFAnimationPropertyTabsDlg::Do no AnimationProperties present");
04326         End();
04327     }
04328 
04329     //Set up the name that the main dialog page will use.
04330     String_256 Temp(_R(IDS_ANIMATION_EXPORT_OPTIONS)); 
04331     TitleString = Temp;
04332     SetName(&TitleString);
04333     
04334     // Make sure that our options tabs have a link to the dialog box class
04335     GIFAnimationPropertyTabs::SetTabbedDlg(this);
04336 
04337     // Force the apply now/ok buttons to a grey state.
04338     m_pGIFAnimationProperties->SetApplyNowState(FALSE);
04339 
04340     // On start up ungrey the OK button.
04341     m_pGIFAnimationProperties->SetOkState(TRUE);
04342 
04343     // Force the dialog box to be created and displayed.
04344     Create();       
04345 };

static OpState AnimExOptns::GetState String_256 ,
OpDescriptor
[inline, static]
 

GIFAnimationPropertyTabsDlg GetState method.

> OpState GIFAnimationPropertyTabsDlg::GetState(String_256*, OpDescriptor*)

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 440 of file aprps.h.

00440 { return TRUE; }        // GetState function

BOOL AnimExOptns::Init void   )  [static]
 

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 4231 of file aprps.cpp.

04232 {
04233     BOOL InitOK;
04234 
04235     // Register ourselves with the dialog system.
04236     InitOK = RegisterOpDescriptor(
04237                                 0,                                                          // Tool ID                                                              
04238                                 _R(IDS_ANIMATION_TAB_DLG),                                      // String resource ID
04239                                 CC_RUNTIME_CLASS(AnimExOptns),                              // Runtime class
04240                                 OPTOKEN_EXPORTGIFANIMTABSDLG,                               // Token string
04241                                 GetState,                                                   // GetState function
04242                                 0,                                                          // help ID
04243                                 0,                                                          // bubble help
04244                                 0, //_R(IDD_BARCONTROLSTORE),                                   // resource ID
04245                                 0, //_R(IDC_BTN_OPTIONSDLG),                                    // control ID
04246                                 SYSTEMBAR_ILLEGAL,                                          // Bar ID
04247                                 TRUE,                                                       // Recieve system messages
04248                                 FALSE,                                                      // Smart duplicate operation
04249                                 TRUE,                                                           // Clean operation
04250                                 0,                                                      // No vertical counterpart
04251                                 _R(IDS_ANIMATION_TAB_DLG_ONE),                                  // String for one copy only error
04252                                 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC)   // Auto state flags
04253                                 );
04254     return (InitOK);
04255 }

MsgResult AnimExOptns::Message Msg Message  )  [virtual]
 

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/06/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
OK Message handled ok. FAIL Something terrible happened whilst processing the message. EAT_MSG The Message was handled ok but don't send it to any more MessageHandlers.

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 4361 of file aprps.cpp.

04362 {
04363     ERROR3IF(Message == NULL,"AnimExOptns::Message NULL message received");
04364 
04365     if (IS_OUR_DIALOG_MSG(Message))
04366     {
04367         DialogMsg* Msg = (DialogMsg*)Message;
04368 
04369         MsgResult Result;
04370 
04371         // Main handler for dialog type messages
04372         BOOL EndDialog = FALSE;                                         // TRUE if we should quit the dialog
04373         BOOL CommitValues = FALSE;                                      // TRUE if we should commit the dialog values
04374         /*BOOL OldApplyNow =*/ m_pGIFAnimationProperties->GetApplyNowState();   // Old ApplyNow button state  
04375 
04376         // Make sure that the tabs know what is the current document and spread to work on.
04377         Document *pDocument = Document::GetSelected();
04378         m_pGIFAnimationProperties->SetCurrentDocAndSpread(pDocument);
04379 
04380         // Make sure that the current document units are correct.
04381         m_pGIFAnimationProperties->SetUpDocUnits();
04382             
04383         // Check if sending init/create message and if so set flag True.
04384         // If True then do not ungrey the ApplyNow button on changing messages
04385         if (Msg->DlgMsg == DIM_CREATE)
04386             m_pGIFAnimationProperties->SetInitMessageState(TRUE);               
04387 
04388         // If the message is not for the main winndow then try the tab pages. 
04389         BOOL FoundPage = FALSE;
04390 
04391         if (Msg->PageID != 0)
04392         {
04393             //Go through all the tabs declared to the system and see if the message is for that page.
04394             GIFAnimationPropertyTabs *pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetFirst();
04395 
04396             while (pGIFAnimationPropertyTabs != NULL&& !FoundPage)
04397             {
04398                 CDlgResID PageId = pGIFAnimationPropertyTabs->GetPageID();
04399                 if (PageId == Msg->PageID)
04400                 {
04401                     // Found the correct page so stop the search and send the message to that page
04402                     pGIFAnimationPropertyTabs->HandleMsg(Msg);
04403                     FoundPage = TRUE;
04404                 }
04405                 // Get the next option's tab.
04406                 pGIFAnimationPropertyTabs = GIFAnimationPropertyTabs::GetNext(pGIFAnimationPropertyTabs);                           
04407             }
04408         }   
04409         else
04410         {
04411             // Main page window
04412             switch (Msg->DlgMsg)
04413             {
04414                 case DIM_COMMIT:        
04415                     EndDialog = TRUE;
04416                     CommitValues = TRUE;
04417                 break;
04418 
04419                 case DIM_SOFT_COMMIT:   
04420                 {
04421                     CommitValues = TRUE;
04422                     m_pGIFAnimationProperties->SetApplyNowState(TRUE);
04423                 }
04424                 break;
04425 
04426                 case DIM_CANCEL:        
04427                     EndDialog = TRUE;
04428                     break;
04429 
04430                 default:
04431                     break;
04432             }
04433         }
04434 
04435         // Commit values here.
04436         if (CommitValues)
04437         {
04438             BOOL ok = CommitDialogValues();
04439             if (!ok)
04440             {
04441                 EndDialog = FALSE;  
04442             }
04443         }
04444         
04445         // Pass the message back to the Base class.
04446         Result = DialogTabOp::Message(Message);
04447 
04448         // End dialog here
04449         if (EndDialog) 
04450         {
04451             Close();        
04452             End();          
04453 
04454             // Remove the link to the options tabs if all dialogs have been cloosed. 
04455             if(m_pGIFAnimationProperties->GetCount() < 1)
04456             {
04457                 // Make sure that we remove our options tabs link to the dialog box class as the dialog will now be destroyed.
04458                 m_pGIFAnimationProperties->SetTabbedDlg(NULL);
04459             }
04460         }
04461         
04462         // Check if we have been sending an init/create message, if so then set the flag False.
04463         if (Msg->DlgMsg == DIM_CREATE)
04464             m_pGIFAnimationProperties->SetInitMessageState(FALSE);
04465                     
04466         //return DialogTabOp::Message(Message);
04467         return Result;
04468     }
04469     else
04470     {
04471         //Pass the message onto the base class message handler.
04472         return GIFAnimationPropertyTabsDlg::Message(Message);
04473     }
04474 }


Member Data Documentation

const CDlgResID AnimExOptns::IDD = _R(IDD_OPTIONS_PROPERTIES) [static, protected]
 

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 444 of file aprps.h.

CDlgMode AnimExOptns::Mode = MODAL [static, protected]
 

Reimplemented from GIFAnimationPropertyTabsDlg.

Definition at line 443 of file aprps.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:49:57 2007 for Camelot by  doxygen 1.4.4