1 ///////////////////////////////////////////////////////////////////////////// 2 // Name: MenuObjectPropDlg.h 3 // Purpose: DVD menu button properties dialog 4 // Author: Alex Thuering 5 // Created: 20.11.2003 6 // RCS-ID: $Id: MenuObjectPropDlg.h,v 1.27 2016/06/20 10:42:37 ntalex Exp $ 7 // Copyright: (c) Alex Thuering 8 // Licence: GPL 9 ///////////////////////////////////////////////////////////////////////////// 10 11 #ifndef BUTTON_PROP_DLG_H 12 #define BUTTON_PROP_DLG_H 13 14 #include "DVD.h" 15 #include "MenuObject.h" 16 #include <wxVillaLib/PropDlg.h> 17 #include <wxSVG/SVGPreserveAspectRatio.h> 18 19 class MenuObjectPropDlg: public wxPropDlg { 20 public: 21 MenuObjectPropDlg(wxWindow *parent, wxString id, bool multObjects, Menu *menu, DVD* dvd, int tsi, int pgci); ~MenuObjectPropDlg()22 virtual ~MenuObjectPropDlg() {} 23 24 private: 25 wxString m_id; 26 bool m_multObjects; 27 MenuObject* m_object; 28 Menu* m_menu; 29 DVD* m_dvd; 30 int m_tsi; // tsi of menu 31 int m_pgci; // pgci of menu 32 void CreatePropPanel(wxSizer* sizer); 33 void CreateNavigationProp(wxSizer* sizer, NavigationButton navButton); 34 void CreateLook(wxBoxSizer* mainSizer); 35 void CreateLocAndSize(wxBoxSizer* mainSizer); 36 void CreateAspectCtrls(wxSizer* sizer, wxSVG_PRESERVEASPECTRATIO align, wxSVG_MEETORSLICE meetOrSlice); 37 void CreateImageCrtls(wxFlexGridSizer* grid, const wxString& title, MenuObjectParam* param); 38 void CreateShadowCtrls(wxFlexGridSizer* grid, const wxString& title, MenuObjectParam* param); 39 void CreateButtonPane(wxSizer* sizer, bool resetButton, bool dontShowCheckbox); 40 41 wxChoice* m_targetChoice; 42 wxChoice* m_chapterChoice; 43 /** Returns titleset id of selected target */ 44 int GetSelectedTsi(); 45 /** Returns PGC id of selected target */ 46 int GetSelectedPgci(); 47 /** Returns true if selected target is menu */ 48 bool IsSelectedMenu(); 49 /** Returns selected chapter number */ 50 int GetSelectedChapter(); 51 52 void* TargetToPtr(int tsi, int pgci, bool menu); 53 void FillTargets(wxChoice* ctrl); 54 void UpdateChapters(); 55 void OnChangeTarget(wxCommandEvent& evt); 56 void OnChangeChapter(wxCommandEvent& evt); 57 58 int m_audioIcon; 59 void OnChangeAudio(wxCommandEvent& evt); 60 int m_subtitleIcon; 61 void OnChangeSubtitle(wxCommandEvent& evt); 62 63 bool m_displayVideoFrame; // shows if video frame must be automatically selected if it is available 64 long m_defaultPos; 65 long m_videoPos; 66 int m_videoDuration; 67 wxTextCtrl* m_imageEdit; 68 int m_imageEditIdx; 69 wxRadioButton* m_imageRadio; 70 wxRadioButton* m_videoFrameRadio; 71 wxChoice* m_videoChoice; 72 wxButton* m_videoFrameBt; 73 wxString GetVideoFilename(bool withTimestamp = false, long position = -1); 74 void OnImageRadio(wxCommandEvent& evt); 75 void OnVideoFrame(wxCommandEvent& evt); 76 void OnJustifyText(wxCommandEvent& evt); 77 bool CanJustifyText(wxString paramName); 78 79 wxTextCtrl* m_customActionEdit; 80 void OnJumpActionSelected(wxCommandEvent& evt); 81 void OnCustomActionSelected(wxCommandEvent& evt); 82 83 wxTextCtrl* m_widthEdit; 84 wxTextCtrl* m_heightEdit; 85 void OnKeepAspectRatio(wxCommandEvent& evt); 86 87 void OnAnimationsBt(wxCommandEvent& event); 88 89 /** Populate values on the model */ 90 bool SetValues(); 91 92 DECLARE_EVENT_TABLE() 93 }; 94 95 #endif // BUTTON_PROP_DLG_H 96