5 #ifndef __uifontscontroller__ 6 #define __uifontscontroller__ 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" 17 #include "../../lib/controls/ctextedit.h" 20 class UIFontsDataSource;
22 class UIFontsController :
public NonAtomicReferenceCounted,
public DelegationController,
public IGenericStringListDataBrowserSourceSelectionChanged
25 UIFontsController (IController* baseController, UIDescription* description, IActionPerformer* actionPerformer);
26 ~UIFontsController ()
override;
29 CView* createView (
const UIAttributes& attributes,
const IUIDescription* description)
override;
30 CView* verifyView (CView* view,
const UIAttributes& attributes,
const IUIDescription* description)
override;
31 IControlListener* getControlListener (UTF8StringPtr name)
override;
32 void valueChanged (CControl* pControl)
override;
34 void dbSelectionChanged (int32_t selectedRow, GenericStringListDataBrowserSource* source)
override;
36 static bool valueToString (
float value,
char utf8String[256], CParamDisplay::ValueToStringUserData* userData);
37 static bool stringToValue (UTF8StringPtr txt,
float& result, CTextEdit::StringToValueUserData* userData);
39 SharedPointer<UIDescription> editDescription;
40 IActionPerformer* actionPerformer;
41 UIFontsDataSource* dataSource;
43 COptionMenu* fontMenu;
44 CTextEdit* altTextEdit;
45 CTextEdit* sizeTextEdit;
46 CControl* boldControl;
47 CControl* italicControl;
48 CControl* strikethroughControl;
49 CControl* underlineControl;
51 std::string selectedFont;
62 kFontStyleStrikethroughTag,
63 kFontStyleUnderlineTag
69 #endif // VSTGUI_LIVE_EDITING 71 #endif // __uifontscontroller__ Definition: customcontrols.cpp:8