00001 /**************************************************************************/ 00023 #ifndef CONFIGPANEL_H 00024 #define CONFIGPANEL_H 00025 00026 //(*Headers(ConfigPanel) 00027 #include <wx/notebook.h> 00028 #include <wx/sizer.h> 00029 #include <wx/stattext.h> 00030 #include <wx/radiobox.h> 00031 #include <wx/textctrl.h> 00032 #include <wx/checkbox.h> 00033 #include <wx/panel.h> 00034 #include <wx/choice.h> 00035 #include <wx/button.h> 00036 //*) 00037 #include <cbstyledtextctrl.h> 00038 #include "DoxyBlocks.h" 00039 #include "configurationpanel.h" 00040 00043 class ConfigPanel: public cbConfigurationPanel 00044 { 00045 public: 00046 00047 ConfigPanel(wxWindow* parent, DoxyBlocks *pOwner, wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize); 00048 virtual ~ConfigPanel(); 00049 void Init(); 00050 00051 // Setters and getters. 00052 // Comments. 00056 wxInt8 GetBlockComment() { return RadioBoxBlockComments->GetSelection(); } 00060 void SetBlockComment(wxInt8 val) { RadioBoxBlockComments->SetSelection(val); } 00064 wxInt8 GetLineComment() { return RadioBoxLineComments->GetSelection(); } 00068 void SetLineComment(wxInt8 val) { RadioBoxLineComments->SetSelection(val); } 00069 // == Doxyfile defaults. == 00070 // Project. 00074 wxString GetProjectNumber() { return TextCtrlProjectNumber->GetValue(); } 00078 void SetProjectNumber(wxString val) { TextCtrlProjectNumber->SetValue(val); } 00082 wxString GetOutputDirectory() { return TextCtrlOutputDirectory->GetValue(); } 00086 void SetOutputDirectory(wxString val) { TextCtrlOutputDirectory->SetValue(val); } 00090 wxString GetOutputLanguage() { return ChoiceOutputLanguage->GetStringSelection(); } 00094 void SetOutputLanguage(wxString val) { ChoiceOutputLanguage->SetStringSelection(val); } 00098 bool GetUseAutoVersion() { return CheckBoxUseAutoVersion->GetValue(); } 00102 void SetUseAutoVersion(bool val) { m_bUseAutoVersion = val; } 00103 // Build. 00107 bool GetExtractAll() { return CheckBoxExtractAll->GetValue(); } 00111 void SetExtractAll(bool val) { CheckBoxExtractAll->SetValue(val); } 00115 bool GetExtractPrivate() { return CheckBoxExtractPrivate->GetValue(); } 00119 void SetExtractPrivate(bool val) { CheckBoxExtractPrivate->SetValue(val); } 00123 bool GetExtractStatic() { return CheckBoxExtractStatic->GetValue(); } 00127 void SetExtractStatic(bool val) { CheckBoxExtractStatic->SetValue(val); } 00128 // Warnings. 00132 bool GetWarnings() { return CheckBoxWarnings->GetValue(); } 00136 void SetWarnings(bool val) { CheckBoxWarnings->SetValue(val); } 00140 bool GetWarnIfDocError() { return CheckBoxWarnIfDocError->GetValue(); } 00144 void SetWarnIfDocError(bool val) { CheckBoxWarnIfDocError->SetValue(val); } 00148 bool GetWarnIfUndocumented() { return CheckBoxWarnIfUndocumented->GetValue(); } 00152 void SetWarnIfUndocumented(bool val) { CheckBoxWarnIfUndocumented->SetValue(val); } 00156 bool GetWarnNoParamdoc() { return CheckBoxWarnNoParamdoc->GetValue(); } 00160 void SetWarnNoParamdoc(bool val) { CheckBoxWarnNoParamdoc->SetValue(val); } 00161 // Alphabetical Class Index. 00165 bool GetAlphabeticalIndex() { return CheckBoxAlphabeticalIndex->GetValue(); } 00169 void SetAlphabeticalIndex(bool val) { CheckBoxAlphabeticalIndex->SetValue(val); } 00170 // Output. 00174 bool GetGenerateHTML() { return CheckBoxGenerateHTML->GetValue(); } 00178 void SetGenerateHTML(bool val) { CheckBoxGenerateHTML->SetValue(val); } 00182 bool GetGenerateHTMLHelp() { return CheckBoxGenerateHTMLHelp->GetValue(); } 00186 void SetGenerateHTMLHelp(bool val) { CheckBoxGenerateHTMLHelp->SetValue(val); } 00190 bool GetGenerateCHI() { return CheckBoxGenerateCHI->GetValue(); } 00194 void SetGenerateCHI(bool val) { CheckBoxGenerateCHI->SetValue(val); } 00198 bool GetBinaryTOC() { return CheckBoxBinaryTOC->GetValue(); } 00202 void SetBinaryTOC(bool val) { CheckBoxBinaryTOC->SetValue(val); } 00206 bool GetGenerateLatex() { return CheckBoxGenerateLatex->GetValue(); } 00210 void SetGenerateLatex(bool val) { CheckBoxGenerateLatex->SetValue(val); } 00214 bool GetGenerateRTF() { return CheckBoxGenerateRTF->GetValue(); } 00218 void SetGenerateRTF(bool val) { CheckBoxGenerateRTF->SetValue(val); } 00222 bool GetGenerateMan() { return CheckBoxGenerateMan->GetValue(); } 00226 void SetGenerateMan(bool val) { CheckBoxGenerateMan->SetValue(val); } 00230 bool GetGenerateXML() { return CheckBoxGenerateXML->GetValue(); } 00234 void SetGenerateXML(bool val) { CheckBoxGenerateXML->SetValue(val); } 00238 bool GetGenerateAutogenDef() { return CheckBoxGenerateAutogenDef->GetValue(); } 00242 void SetGenerateAutogenDef(bool val) { CheckBoxGenerateAutogenDef->SetValue(val); } 00246 bool GetGeneratePerlMod() { return CheckBoxGeneratePerlMod->GetValue(); } 00250 void SetGeneratePerlMod(bool val) { CheckBoxGeneratePerlMod->SetValue(val); } 00251 // Pre-processor. 00255 bool GetEnablePreprocessing() { return CheckBoxEnablePreprocessing->GetValue(); } 00259 void SetEnablePreprocessing(bool val) { CheckBoxEnablePreprocessing->SetValue(val); } 00260 // Dot. 00264 bool GetHaveDot() { return CheckBoxHaveDot->GetValue(); } 00268 void SetHaveDot(bool val) { CheckBoxHaveDot->SetValue(val); } 00272 bool GetClassDiagrams() { return CheckBoxClassDiagrams->GetValue(); } 00276 void SetClassDiagrams(bool val) { CheckBoxClassDiagrams->SetValue(val); } 00277 // Paths. 00281 wxString GetPathDoxygen() { return TextCtrlPathDoxygen->GetValue(); } 00285 void SetPathDoxygen(wxString val) { TextCtrlPathDoxygen->SetValue(val); } 00289 wxString GetPathDoxywizard() { return TextCtrlPathDoxywizard->GetValue(); } 00293 void SetPathDoxywizard(wxString val) { TextCtrlPathDoxywizard->SetValue(val); } 00297 wxString GetPathHHC() { return TextCtrlPathHHC->GetValue(); } 00301 void SetPathHHC(wxString val) { TextCtrlPathHHC->SetValue(val); } 00305 wxString GetPathDot() { return TextCtrlPathDot->GetValue(); } 00309 void SetPathDot(wxString val) { TextCtrlPathDot->SetValue(val); } 00313 wxString GetPathCHMViewer() { return TextCtrlPathCHMViewer->GetValue(); } 00317 void SetPathCHMViewer(wxString val) { TextCtrlPathCHMViewer->SetValue(val); } 00318 // General Options 00322 bool GetOverwriteDoxyfile() { return CheckBoxOverwriteDoxyfile->GetValue(); } 00326 void SetOverwriteDoxyfile(bool val) { CheckBoxOverwriteDoxyfile->SetValue(val); } 00330 bool GetPromptBeforeOverwriting() { return CheckBoxPromptBeforeOverwriting->GetValue(); } 00334 void SetPromptBeforeOverwriting(bool val) { CheckBoxPromptBeforeOverwriting->SetValue(val); } 00338 bool GetUseAtInTags() { return CheckBoxUseAtInTags->GetValue(); } 00342 void SetUseAtInTags(bool val) { CheckBoxUseAtInTags->SetValue(val); } 00346 bool GetLoadTemplate() { return CheckBoxLoadTemplate->GetValue(); } 00350 void SetLoadTemplate(bool val) { CheckBoxLoadTemplate->SetValue(val); } 00354 bool GetUseInternalViewer() { return CheckBoxUseInternalViewer->GetValue(); } 00358 void SetUseInternalViewer(bool val) { CheckBoxUseInternalViewer->SetValue(val); } 00362 bool GetRunHTML() { return CheckBoxRunHTML->GetValue(); } 00366 void SetRunHTML(bool val) { CheckBoxRunHTML->SetValue(val); } 00370 bool GetRunCHM() { return CheckBoxRunCHM->GetValue(); } 00374 void SetRunCHM(bool val) { CheckBoxRunCHM->SetValue(val); } 00375 00379 void SetAutoVersioning(bool val) { m_bAutoVersioning = val; } 00380 00381 //(*Declarations(ConfigPanel) 00382 cbStyledTextCtrl* TextCtrlBlockComment; 00383 wxCheckBox* CheckBoxGenerateHTML; 00384 wxButton* ButtonBrowseHHC; 00385 wxCheckBox* CheckBoxGenerateLatex; 00386 wxCheckBox* CheckBoxOverwriteDoxyfile; 00387 wxButton* ButtonBrowseCHMViewer; 00388 wxCheckBox* CheckBoxClassDiagrams; 00389 wxTextCtrl* TextCtrlOutputDirectory; 00390 wxButton* ButtonBrowseDoxywizard; 00391 wxCheckBox* CheckBoxGenerateHTMLHelp; 00392 wxTextCtrl* TextCtrlPathHHC; 00393 wxRadioBox* RadioBoxBlockComments; 00394 wxChoice* ChoiceOutputLanguage; 00395 wxCheckBox* CheckBoxRunHTML; 00396 wxTextCtrl* TextCtrlPathDot; 00397 wxCheckBox* CheckBoxUseInternalViewer; 00398 wxCheckBox* CheckBoxGenerateCHI; 00399 wxCheckBox* CheckBoxGenerateRTF; 00400 wxCheckBox* CheckBoxWarnIfUndocumented; 00401 wxCheckBox* CheckBoxGenerateAutogenDef; 00402 wxCheckBox* CheckBoxExtractAll; 00403 wxButton* ButtonBrowseDot; 00404 wxTextCtrl* TextCtrlPathDoxygen; 00405 wxCheckBox* CheckBoxWarnings; 00406 wxTextCtrl* TextCtrlProjectNumber; 00407 wxTextCtrl* TextCtrlPathDoxywizard; 00408 wxCheckBox* CheckBoxAlphabeticalIndex; 00409 wxCheckBox* CheckBoxRunCHM; 00410 wxCheckBox* CheckBoxWarnIfDocError; 00411 wxCheckBox* CheckBoxGeneratePerlMod; 00412 wxButton* ButtonBrowseDoxygen; 00413 wxCheckBox* CheckBoxGenerateXML; 00414 wxCheckBox* CheckBoxUseAtInTags; 00415 wxCheckBox* CheckBoxHaveDot; 00416 wxCheckBox* CheckBoxExtractStatic; 00417 cbStyledTextCtrl* TextCtrlLineComment; 00418 wxCheckBox* CheckBoxWarnNoParamdoc; 00419 wxCheckBox* CheckBoxBinaryTOC; 00420 wxRadioBox* RadioBoxLineComments; 00421 wxCheckBox* CheckBoxGenerateMan; 00422 wxCheckBox* CheckBoxUseAutoVersion; 00423 wxCheckBox* CheckBoxEnablePreprocessing; 00424 wxTextCtrl* TextCtrlPathCHMViewer; 00425 wxCheckBox* CheckBoxExtractPrivate; 00426 wxCheckBox* CheckBoxLoadTemplate; 00427 wxCheckBox* CheckBoxPromptBeforeOverwriting; 00428 //*) 00429 00430 protected: 00431 00432 //(*Identifiers(ConfigPanel) 00433 static const long ID_RADIOBOX_BLOCKCOMMENTS; 00434 static const long ID_TEXTCTRL_BLOCKCOMMENT; 00435 static const long ID_RADIOBOX_LINECOMMENTS; 00436 static const long ID_TEXTCTRL_LINECOMMENT; 00437 static const long ID_PANEL2; 00438 static const long ID_STATICTEXT1; 00439 static const long ID_TEXTCTRL_PROJECTNUMBER; 00440 static const long ID_CHECKBOX_USEAUTOVERSION; 00441 static const long ID_STATICTEXT8; 00442 static const long ID_TEXTCTRLOUTPUT_DIRECTORY; 00443 static const long ID_STATICTEXT5; 00444 static const long ID_CHOICE_OUTPUT_LANGUAGE; 00445 static const long ID_CHECKBOX_EXTRACT_ALL; 00446 static const long ID_CHECKBOX_EXTRACTPRIVATE; 00447 static const long ID_CHECKBOX_EXTRACTSTATIC; 00448 static const long ID_CHECKBOX_WARNINGS; 00449 static const long ID_CHECKBOX_WARN_IF_DOC_ERROR; 00450 static const long ID_CHECKBOX_WARN_IF_UNDOCUMENTED; 00451 static const long ID_CHECKBOX_WARN_NO_PARAMDOC; 00452 static const long ID_CHECKBOX_ALPHABETICAL_INDEX; 00453 static const long ID_PANEL3; 00454 static const long ID_CHECKBOX_GENERATE_HTML; 00455 static const long ID_CHECKBOX_GENERATE_HTMLHELP; 00456 static const long ID_CHECKBOX_GENERATE_CHI; 00457 static const long ID_CHECKBOX_BINARY_TOC; 00458 static const long ID_CHECKBOX_GENERATE_LATEX; 00459 static const long ID_CHECKBOX_GENERATE_RTF; 00460 static const long ID_CHECKBOX_GENERATE_MAN; 00461 static const long ID_CHECKBOX_GENERATE_XML; 00462 static const long ID_CHECKBOX_GENERATE_AUTOGEN_DEF; 00463 static const long ID_CHECKBOX_GENERATE_PERLMOD; 00464 static const long ID_CHECKBOX_ENABLE_PREPROCESSING; 00465 static const long ID_CHECKBOX_CLASS_DIAGRAMS; 00466 static const long ID_CHECKBOX_HAVE_DOT; 00467 static const long ID_PANEL4; 00468 static const long ID_STATICTEXT2; 00469 static const long ID_TEXTCTRL_PATHDOXYGEN; 00470 static const long ID_BUTTON_BROWSEDOXYGEN; 00471 static const long ID_STATICTEXT4; 00472 static const long ID_TEXTCTRL_PATHDOXYWIZARD; 00473 static const long ID_BUTTON_BROWSEDOXYWIZARD; 00474 static const long ID_STATICTEXT3; 00475 static const long ID_TEXTCTRL_PATHHHC; 00476 static const long ID_BUTTON_BROWSEHHC; 00477 static const long ID_STATICTEXT6; 00478 static const long ID_TEXTCTRL_PATHDOT; 00479 static const long ID_BUTTON_BROWSEDOT; 00480 static const long ID_STATICTEXT7; 00481 static const long ID_TEXTCTRL_PATHCHMVIEWER; 00482 static const long ID_BUTTON_BROWSECHMVIEWER; 00483 static const long ID_CHECKBOX_OVERWRITEDOXYFILE; 00484 static const long ID_CHECKBOX_PROMPTB4OVERWRITING; 00485 static const long ID_CHECKBOX_USEATINTAGS; 00486 static const long ID_CHECKBOX_LOADTEMPLATE; 00487 static const long ID_CHECKBOX_USEINTERNALVIEWER; 00488 static const long ID_CHECKBOX_RUNHTML; 00489 static const long ID_CHECKBOX_RUNCHM; 00490 static const long ID_PANEL1; 00491 static const long ID_NOTEBOOK_PREFS; 00492 //*) 00493 00494 private: 00495 00496 //(*Handlers(ConfigPanel) 00497 void OnRadioBoxBlockCommentsSelect(wxCommandEvent& event); 00498 void OnRadioBoxLineCommentsSelect(wxCommandEvent& event); 00499 void OnButtonBrowseDoxygenClick(wxCommandEvent& event); 00500 void OnButtonBrowseDoxywizardClick(wxCommandEvent& event); 00501 void OnButtonBrowseHHCClick(wxCommandEvent& event); 00502 void OnButtonBrowseDotClick(wxCommandEvent& event); 00503 void OnCheckBoxGenerateHTMLClick(wxCommandEvent& event); 00504 void OnCheckBoxOverwriteDoxyfileClick(wxCommandEvent& event); 00505 void OnCheckBoxWarningsClick(wxCommandEvent& event); 00506 void OnCheckBoxUseAutoversionClick(wxCommandEvent& event); 00507 void OnCheckBoxUseAtInTagsClick(wxCommandEvent& event); 00508 void OnButtonBrowseCHMViewerClick(wxCommandEvent& event); 00509 //*) 00510 00511 // virtual routines required by cbConfigurationPanel 00518 wxString GetTitle() const { return _("DoxyBlocks"); } 00519 wxString GetBitmapBaseName() const; 00520 void OnApply(); 00525 void OnCancel(){} 00526 00527 wxString GetApplicationPath(); 00528 void InitSTC(cbStyledTextCtrl * stc); 00529 void WriteBlockComment(cbStyledTextCtrl *stc, int iBlockComment, bool bUseAtInTags); 00530 void WriteLineComment(cbStyledTextCtrl *stc, int iLineComment); 00531 00532 // Pointer to owner of the configuration dialog needed to complete the OnApply/OnCancel EndModal() logic 00533 DoxyBlocks* m_pOwnerClass; 00534 00535 bool m_bAutoVersioning; 00536 bool m_bUseAutoVersion; 00537 00538 00539 DECLARE_EVENT_TABLE() 00540 00541 // These comments show how to document the variables declared by wxSmith. They can't be documented in place because the will 00542 // be overwritten by the next change, so I use remote documentation. While these comments don't contribute a great deal they do prevent 00543 // the variables from remaining undocumented, show how to get documentation into the extracted docs and allow you to run doxygen with 00544 // all warnings active without receiving a warning for each one. 00686 // IDs 00864 }; 00865 00866 00867 #endif
1.7.1