5 #ifndef __uiattributescontroller__ 6 #define __uiattributescontroller__ 8 #include "../uidescription.h" 10 #if VSTGUI_LIVE_EDITING 12 #include "uiselection.h" 13 #include "../delegationcontroller.h" 14 #include "../iviewcreator.h" 15 #include "uiundomanager.h" 16 #include "../../lib/controls/ctextedit.h" 22 namespace UIAttributeControllers {
27 class UIAttributesController :
public CBaseObject,
public DelegationController
30 UIAttributesController (IController* baseController, UISelection* selection, UIUndoManager* undoManager, UIDescription* description);
31 ~UIAttributesController ()
override;
33 void beginLiveAttributeChange (
const std::string& name,
const std::string& currentValue);
34 void endLiveAttributeChange ();
35 void performAttributeChange (
const std::string& name,
const std::string& value);
37 using StringList = std::list<std::string>;
39 CView* createViewForAttribute (
const std::string& attrName);
40 void rebuildAttributesView ();
41 void validateAttributeViews ();
42 CView* createValueViewForAttributeType (
const UIViewFactory* viewFactory, CView* view,
const std::string& attrName, IViewCreator::AttrType attrType);
43 void getConsolidatedAttributeNames (StringList& result,
const std::string& filter);
45 void valueChanged (CControl* pControl)
override;
46 CView* verifyView (CView* view,
const UIAttributes& attributes,
const IUIDescription* description)
override;
47 IController* createSubController (IdStringPtr name,
const IUIDescription* description)
override;
48 IControlListener* getControlListener (UTF8StringPtr name)
override;
50 CMessageResult notify (CBaseObject* sender, IdStringPtr message)
override;
52 SharedPointer<UISelection> selection;
53 SharedPointer<UIUndoManager> undoManager;
54 SharedPointer<UIDescription> editDescription;
55 SharedPointer<CVSTGUITimer> timer;
58 using UIAttributeControllerList = std::list<UIAttributeControllers::Controller*>;
59 UIAttributeControllerList attributeControllers;
62 kSearchFieldTag = 100,
66 SharedPointer<CTextEdit> searchField;
67 CTextLabel* viewNameLabel;
68 CRowColumnView* attributeView;
70 std::string filterString;
72 const std::string* currentAttributeName;
77 #endif // VSTGUI_LIVE_EDITING 79 #endif // __uiattributescontroller__ Definition: customcontrols.cpp:8