5 #ifndef __uitemplatecontroller__ 6 #define __uitemplatecontroller__ 8 #include "../uidescription.h" 10 #if VSTGUI_LIVE_EDITING 12 #include "uiselection.h" 13 #include "uiundomanager.h" 15 #include "../delegationcontroller.h" 16 #include "../../lib/cdatabrowser.h" 21 class UIViewListDataSource;
24 class UITemplateController :
public CBaseObject,
public DelegationController,
public IContextMenuController2,
public IGenericStringListDataBrowserSourceSelectionChanged,
public IDependency
27 UITemplateController (IController* baseController, UIDescription* description, UISelection* selection, UIUndoManager* undoManager, IActionPerformer* actionPerformer);
28 ~UITemplateController ()
override;
30 const UTF8String* getSelectedTemplateName ()
const {
return selectedTemplateName; }
32 void selectTemplate (UTF8StringPtr name);
33 void setTemplateView (CViewContainer* view);
35 static void setupDataBrowser (CDataBrowser* orignalBrowser, CDataBrowser* dataBrowser);
37 static IdStringPtr kMsgTemplateChanged;
38 static IdStringPtr kMsgTemplateNameChanged;
40 void valueChanged (CControl* pControl)
override {}
41 CView* createView (
const UIAttributes& attributes,
const IUIDescription* description)
override;
42 CView* verifyView (CView* view,
const UIAttributes& attributes,
const IUIDescription* description)
override;
43 IController* createSubController (UTF8StringPtr name,
const IUIDescription* description)
override;
45 void dbSelectionChanged (int32_t selectedRow, GenericStringListDataBrowserSource* source)
override;
47 void appendContextMenuItems (COptionMenu& contextMenu, CView* view,
const CPoint& where)
override;
49 CMessageResult notify (CBaseObject* sender, IdStringPtr message)
override;
51 SharedPointer<UIDescription> editDescription;
52 SharedPointer<UISelection> selection;
53 SharedPointer<UIUndoManager> undoManager;
54 IActionPerformer* actionPerformer;
55 CViewContainer* templateView;
56 CDataBrowser* templateDataBrowser;
57 UIViewListDataSource* mainViewDataSource;
58 GenericStringListDataBrowserSource::StringVector templateNames;
59 const UTF8String* selectedTemplateName;
64 #endif // VSTGUI_LIVE_EDITING 66 #endif // __uitemplatecontroller__ Definition: customcontrols.cpp:8