#include <aprps.h>
Inheritance diagram for PreviewInBrowserTab:
Public Member Functions | |
PreviewInBrowserTab () | |
PreviewInBrowserTab constructor. | |
~PreviewInBrowserTab () | |
AnimationColoursTab destructor. | |
virtual BOOL | Init () |
virtual BOOL | HandleMsg (DialogMsg *Msg) |
Handles all the messages for this Animation colours tab. | |
virtual BOOL | InitSection () |
Sets initial values for this tab on the animation properties dialog box. | |
virtual BOOL | CommitSection () |
Takes the values in the Animation colours tab. Called when ok or apply now is pressed on the main dialog box. | |
virtual BOOL | UpdateLayerSection () |
Called when the spread-related section of the tab should be updated. | |
virtual BOOL | GreySection () |
Called when the user has closed all documents. | |
virtual BOOL | UngreySection () |
Called when the user has selected a new document. | |
virtual BOOL | UpdateSection () |
Called when we have switched to a new document and need to update all the controls on this tab. | |
virtual CDlgResID | GetPageID () |
virtual BOOL | IsPropertyRequired () |
BOOL | ChangeControlStatus (const BOOL Status) |
Called to grey/ungrey all controls on this tab. | |
BOOL | GetBrowserValues (BrowserPreviewOptions *BrowserOptions) |
| |
Static Public Member Functions | |
static BOOL | Declare () |
To declare preferences associated with the bitmap preview properties. | |
Static Public Attributes | |
static BrowserBackground | g_Background = BROWSER_BGR_NONE |
static BOOL | g_InfoInHtmlStub = TRUE |
static BOOL | g_Imagemap = TRUE |
Private Member Functions | |
BOOL | ShowDetails () |
Shows the details of the associated SPREAD in this tab. | |
virtual BOOL | UpdateApplyState () |
This changes the 'Apply now' state based on the settings of the active spread and the settings in this tab. If the settings are the same, the 'Apply state' is FALSE, else it is TRUE. | |
BOOL | HavePropertiesChanged () |
Private Attributes | |
BOOL | m_GreyStatus |
Definition at line 379 of file aprps.h.
|
PreviewInBrowserTab constructor.
Definition at line 4516 of file aprps.cpp.
|
|
AnimationColoursTab destructor.
Definition at line 4535 of file aprps.cpp.
|
|
Called to grey/ungrey all controls on this tab.
Definition at line 4763 of file aprps.cpp. 04764 { 04765 pPropertiesDlg->EnableGadget(_R(IDC_PLAINBKGND), Status); 04766 pPropertiesDlg->EnableGadget(_R(IDC_DOCBKGND), Status); 04767 pPropertiesDlg->EnableGadget(_R(IDC_CHQBKGND), Status); 04768 pPropertiesDlg->EnableGadget(_R(IDC_GIF_BITMAPPREVIEW), Status); 04769 pPropertiesDlg->EnableGadget(_R(IDC_HTMLSTUB), Status); 04770 // pPropertiesDlg->EnableGadget(_R(IDC_GIF_T5CHECK2), Status); 04771 04772 // Grey the apply now/ok/cancel buttons. 04773 PreviewInBrowserTab::GreyApplyNow(); 04774 return TRUE; 04775 }
|
|
Takes the values in the Animation colours tab. Called when ok or apply now is pressed on the main dialog box.
Reimplemented from GIFAnimationPropertyTabs. Definition at line 4604 of file aprps.cpp. 04605 { 04606 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::CommitSection called with a NULL dialog pointer"); 04607 04608 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04609 if (!ok) 04610 return TRUE; 04611 04612 // Have the preview in browser tab properties changed? 04613 if (HavePropertiesChanged()) 04614 { 04615 // Get the new details. 04616 BrowserBackground Bgr = BROWSER_BGR_NONE; 04617 04618 if(pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_PLAINBKGND))) 04619 Bgr = BROWSER_BGR_NONE; 04620 04621 else if (pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_DOCBKGND))) 04622 Bgr = BROWSER_BGR_DOC; 04623 04624 else if (pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_CHQBKGND))) 04625 Bgr = BROWSER_BGR_CHECKER; 04626 04627 BOOL Info = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_HTMLSTUB)); 04628 04629 // Store these new details in the global variables. 04630 g_Background = Bgr; 04631 g_InfoInHtmlStub =Info; 04632 } 04633 04634 // Everything ok. 04635 return TRUE; 04636 }
|
|
To declare preferences associated with the bitmap preview properties.
Definition at line 5196 of file aprps.cpp. 05197 { 05198 if (Camelot.DeclareSection(_T("Browser Preview"), 5)) 05199 { 05200 Camelot.DeclarePref( NULL, _T("BrowserBackground"), (INT32*)&g_Background, 0, 3 ); 05201 Camelot.DeclarePref( NULL, _T("IncludeImageMap"), &g_Imagemap, 0, 1 ); 05202 Camelot.DeclarePref( NULL, _T("IncludeInfoInHTMLStub"), &g_InfoInHtmlStub, 0, 1 ); 05203 } 05204 05205 // All ok 05206 return TRUE; 05207 }
|
|
Definition at line 5080 of file aprps.cpp. 05081 { 05082 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::HandleMsg called with a NULL dialog pointer"); 05083 05084 /* // talk to the browser tab 05085 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 05086 if (!ok) 05087 return TRUE; */ 05088 05089 // Take the current settings from the tab 05090 // Talk to page done in CommitSection 05091 CommitSection(); 05092 05093 // Force the image map flag to false. 05094 PORTNOTE("other", "Disabled BrowserPreviewOptions") 05095 #ifndef EXCLUDE_FROM_XARALX 05096 BOOL Imagemap = FALSE; 05097 05098 // Make a note of the options. 05099 pBrowserOptions->Set(g_Background, g_InfoInHtmlStub, Imagemap); 05100 #endif 05101 05102 // Everything ok. 05103 return TRUE; 05104 }
|
|
Reimplemented from GIFAnimationPropertyTabs. Definition at line 4569 of file aprps.cpp. 04570 { 04571 return _R(IDD_TAB_PREVIEW_IN_BROWSER); 04572 }
|
|
Called when the user has closed all documents.
Reimplemented from PropertyTabs. Definition at line 4692 of file aprps.cpp. 04693 { 04694 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::GreySection called with no dialog pointer"); 04695 04696 //Ensure we are talking to the correct page. 04697 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04698 if (!ok) 04699 return TRUE; 04700 04701 // Only update if we are not already grey. 04702 if (m_GreyStatus == TRUE) 04703 return TRUE; 04704 04705 // Call the central greying/ungreying function 04706 ok = ChangeControlStatus(FALSE); 04707 04708 // Set the correct grey status 04709 m_GreyStatus = TRUE; 04710 SetApplyNowState(FALSE); 04711 04712 return ok; 04713 }
|
|
Handles all the messages for this Animation colours tab.
Reimplemented from GIFAnimationPropertyTabs. Definition at line 4923 of file aprps.cpp. 04924 { 04925 ERROR2IF(Msg == NULL,FALSE,"PreviewInBrowserTab::Message null message received"); 04926 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::HandleMsg called with a NULL dialog pointer"); 04927 04928 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04929 if (!ok) 04930 return TRUE; 04931 04932 // Handle the message. 04933 switch(Msg->DlgMsg) 04934 { 04935 case DIM_CREATE: 04936 { 04937 // Set the Grey status flag to FALSE. 04938 m_GreyStatus = FALSE; 04939 04940 // Perform the necessary initialization. 04941 ok = InitSection(); 04942 if (!ok) 04943 InformError(); 04944 04945 // Get the global settnigs. 04946 BrowserBackground Bgr = g_Background; 04947 BOOL Info = g_InfoInHtmlStub; 04948 04949 // Set the background radiobuttons. 04950 if(Bgr == BROWSER_BGR_NONE) 04951 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), TRUE); 04952 04953 else if (Bgr == BROWSER_BGR_DOC) 04954 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_DOCBKGND), TRUE); 04955 04956 else if (Bgr == BROWSER_BGR_CHECKER) 04957 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_CHQBKGND), TRUE); 04958 04959 else if (Bgr == BROWSER_BGR_BITMAP) 04960 { 04961 // In the Bitmap Preview diagram, the user selected this radio button. 04962 // In the animation properties dialog, this radio button has not been included. 04963 // We therfore, force the selection to BROWSER_BGR_NONE 04964 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), TRUE); 04965 04966 // Make a note of this new selection. 04967 g_Background = BROWSER_BGR_BITMAP; 04968 } 04969 04970 // Setup the checkboxes. 04971 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_HTMLSTUB), Info == TRUE); 04972 04973 break; 04974 } 04975 04976 case DIM_LFT_BN_CLICKED: 04977 { 04978 if (FALSE) {} 04979 else if (Msg->GadgetID == _R(IDC_GIF_BITMAPPREVIEW)) 04980 { 04981 // A Click on the 'Browser Preview' button 04982 04983 PORTNOTE("other", "Disabled BrowserPreviewOptions") 04984 #ifndef EXCLUDE_FROM_XARALX 04985 // The op cannot be invoked if the current doc. is empty. 04986 // Return false if the document is empty. 04987 String_256 ShadeReason; 04988 OpState State = OpGrabAllFrames::GetState(&ShadeReason, NULL); 04989 04990 if (State.Greyed) 04991 { 04992 // The current doc, is empty, inform the user. 04993 InformError(_R(IDS_NOFRAMESTOPREVIEW)); 04994 } 04995 else 04996 { 04997 // Preview the animtion in the browser. 04998 // Store the current browser options here. 04999 BrowserPreviewOptions BrowserOptions; 05000 05001 // Get the browser options 05002 GetBrowserValues(&BrowserOptions); 05003 05004 // Invoke the OP to preview the animation. 05005 OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_FRAME_BROWSERPREVIEW); 05006 05007 if (pOpDesc != NULL) 05008 pOpDesc->Invoke(); 05009 } 05010 #endif 05011 } 05012 else if (Msg->GadgetID == _R(IDC_PLAINBKGND)) 05013 { 05014 // Set the correct state of the applynow flag. 05015 PreviewInBrowserTab::SetApplyNowState(TRUE); 05016 05017 // Ungrey the apply/ok/cancel buttons. 05018 PreviewInBrowserTab::UngreyApplyNow(); 05019 } 05020 else if (Msg->GadgetID == _R(IDC_DOCBKGND)) 05021 { 05022 // Set the correct state of the applynow flag. 05023 PreviewInBrowserTab::SetApplyNowState(TRUE); 05024 05025 // Ungrey the apply/ok/cancel buttons. 05026 PreviewInBrowserTab::UngreyApplyNow(); 05027 } 05028 else if (Msg->GadgetID == _R(IDC_CHQBKGND)) 05029 { 05030 // Set the correct state of the applynow flag. 05031 PreviewInBrowserTab::SetApplyNowState(TRUE); 05032 05033 // Ungrey the apply/ok/cancel buttons. 05034 PreviewInBrowserTab::UngreyApplyNow(); 05035 } 05036 else if (Msg->GadgetID == _R(IDC_GIF_BITMAPPREVIEW)) 05037 { 05038 // Set the correct state of the applynow flag. 05039 PreviewInBrowserTab::SetApplyNowState(TRUE); 05040 05041 // Ungrey the apply/ok/cancel buttons. 05042 PreviewInBrowserTab::UngreyApplyNow(); 05043 } 05044 } 05045 break; 05046 05047 case DIM_SET_ACTIVE: 05048 { 05049 //Force the Apply now/ok buttons into a grey state. 05050 //PreviewInBrowserTab::GreyApplyNow(); 05051 if(PreviewInBrowserTab::GetApplyNowState()) 05052 { 05053 // Ungrey the apply/ok/cancel buttons. 05054 PreviewInBrowserTab::UngreyApplyNow(); 05055 } 05056 } 05057 break; 05058 05059 default: 05060 break; 05061 } 05062 return TRUE; 05063 }
|
|
Definition at line 4651 of file aprps.cpp. 04652 { 04653 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::HavePropertiesChanged called with a NULL dialog pointer"); 04654 04655 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04656 if (!ok) 04657 return TRUE; 04658 04659 // Get the current details. 04660 BrowserBackground Bgr = BROWSER_BGR_NONE; 04661 04662 if(pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_PLAINBKGND))) 04663 Bgr = BROWSER_BGR_NONE; 04664 04665 else if (pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_DOCBKGND))) 04666 Bgr = BROWSER_BGR_DOC; 04667 04668 else if (pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_CHQBKGND))) 04669 Bgr = BROWSER_BGR_CHECKER; 04670 04671 BOOL Info = pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_HTMLSTUB)); 04672 04673 // Compare the new details to those stored in the global variables. 04674 return 04675 (( Bgr != g_Background) || 04676 ( Info != g_InfoInHtmlStub)); 04677 }
|
|
Reimplemented from GIFAnimationPropertyTabs. Definition at line 4552 of file aprps.cpp. 04553 { 04554 return TRUE; 04555 }
|
|
Sets initial values for this tab on the animation properties dialog box.
Reimplemented from GIFAnimationPropertyTabs. Definition at line 5163 of file aprps.cpp. 05164 { 05165 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::InitSection called with a NULL dialog pointer"); 05166 05167 // Get a ptr to the current document. 05168 Document* pDoc = Document::GetCurrent(); 05169 05170 // If there is no document, then grey the tab. 05171 if(!pDoc) 05172 { 05173 GreySection(); 05174 return (TRUE); 05175 } 05176 05177 // Display the details. 05178 ShowDetails(); 05179 05180 //Everything ok. 05181 return TRUE; 05182 }
|
|
Reimplemented from PropertyTabs. Definition at line 4584 of file aprps.cpp. 04585 { 04586 return TRUE; // This tab is required 04587 }
|
|
Shows the details of the associated SPREAD in this tab.
Definition at line 4818 of file aprps.cpp. 04819 { 04820 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::ShowDetails called with a NULL dialog pointer"); 04821 04822 // Talk to the correct page. 04823 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04824 if (!ok) 04825 return TRUE; 04826 04827 BrowserBackground Bgr = g_Background; // Get the background details. 04828 BOOL Info = g_InfoInHtmlStub; // Get the Include 'file info within HTML stub' details. 04829 04830 // Selelct the correct 'background' radio button. 04831 if(Bgr == BROWSER_BGR_NONE) 04832 { 04833 // Check this radio button. 04834 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), TRUE); 04835 04836 // Uncheck all other radio buttons in this group. 04837 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_DOCBKGND), FALSE); 04838 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_CHQBKGND), FALSE); 04839 } 04840 04841 else if (Bgr == BROWSER_BGR_DOC) 04842 { 04843 // Check this radio button. 04844 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_DOCBKGND), TRUE); 04845 04846 // Uncheck all other radio buttons in this group. 04847 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), FALSE); 04848 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_CHQBKGND), FALSE); 04849 } 04850 04851 else if (Bgr == BROWSER_BGR_CHECKER) 04852 { 04853 // Check this radio button. 04854 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_CHQBKGND), TRUE); 04855 04856 // Uncheck all other radio buttons in this group. 04857 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), FALSE); 04858 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_DOCBKGND), FALSE); 04859 } 04860 04861 else if (Bgr == BROWSER_BGR_BITMAP) 04862 { 04863 // In the Bitmap Preview diagram, the user selected this radio button. 04864 // In the animation properties dialog, this radio button has not been included. 04865 // We therfore, force the selection to BROWSER_BGR_NONE 04866 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_PLAINBKGND), TRUE); 04867 04868 // Uncheck all other radio buttons in this group. 04869 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_DOCBKGND), FALSE); 04870 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_CHQBKGND), FALSE); 04871 04872 // Make a note of this new selection. 04873 g_Background = BROWSER_BGR_BITMAP; 04874 } 04875 04876 // Set the correct state of the 'Include file info within HTML stub' check box. 04877 pPropertiesDlg->SetBoolGadgetSelected(_R(IDC_HTMLSTUB), Info == TRUE); 04878 04879 // Everything ok. 04880 return TRUE; 04881 }
|
|
Called when the user has selected a new document.
Reimplemented from PropertyTabs. Definition at line 4728 of file aprps.cpp. 04729 { 04730 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::UngreySection called with a NULL dialog pointer"); 04731 04732 // Ensure we are talking to the correct page. 04733 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04734 if (!ok) 04735 return TRUE; 04736 04737 // Only update if we are not already ungrey. 04738 if (m_GreyStatus == FALSE) 04739 return TRUE; 04740 04741 // Call the central greying/ungreying function 04742 ok = ChangeControlStatus(TRUE); 04743 04744 m_GreyStatus = FALSE; 04745 04746 return ok; 04747 }
|
|
This changes the 'Apply now' state based on the settings of the active spread and the settings in this tab. If the settings are the same, the 'Apply state' is FALSE, else it is TRUE.
Reimplemented from GIFAnimationPropertyTabs. Definition at line 5122 of file aprps.cpp. 05123 { 05124 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::UpdateApplyState called with a NULL dialog pointer"); 05125 /* 05126 // Ensure we talk ot the correct page. 05127 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 05128 if (!ok) 05129 return TRUE; 05130 05131 // What is the current state of the buttons. 05132 BOOL ApplyState = GetApplyNow(); 05133 05134 if(!GetCurrentApplyNow()) 05135 { 05136 // Make a note of the state. 05137 SetCurrentApplyNow(ApplyState); 05138 } 05139 05140 //Force the Apply now/ok buttons into a grey state. 05141 PreviewInBrowserTab::GreyApplyNow(); 05142 05143 // Set the status to GREY. 05144 PreviewInBrowserTab::SetApplyNowState(FALSE); 05145 */ 05146 // Everything ok. 05147 return TRUE; 05148 }
|
|
Called when the spread-related section of the tab should be updated.
Reimplemented from PropertyTabs. Definition at line 4895 of file aprps.cpp. 04896 { 04897 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::UpdateLayerSection() called with a NULL dialog pointer"); 04898 04899 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04900 if (!ok) 04901 return TRUE; 04902 04903 // Display the details in this tab. 04904 ShowDetails(); 04905 04906 // Everything OK. 04907 return TRUE; 04908 }
|
|
Called when we have switched to a new document and need to update all the controls on this tab.
Reimplemented from PropertyTabs. Definition at line 4790 of file aprps.cpp. 04791 { 04792 ERROR2IF(pPropertiesDlg == NULL,FALSE,"PreviewInBrowserTab::UpdateSection called with a NULL dialog pointer"); 04793 04794 // Ensure we a re talking to the correct page. 04795 BOOL ok = pPropertiesDlg->TalkToPage(GetPageID()); 04796 if (!ok) 04797 return TRUE; 04798 04799 // Show the correct details. 04800 ShowDetails(); 04801 04802 return TRUE; 04803 }
|
|
|
|
|
|
|
|
|