7#ifndef __HDI_CORE_LABEL__
8#define __HDI_CORE_LABEL__
21 #if defined(HDI_CORE_AIP_MODE)
51 RectangleFrameShape = 10,
52 RoundedRectFrameShape = 20,
53 CapsuleFrameShape = 30
102 Label(
const Point& loc_,
const std::string& title_,
const double width_);
179 virtual std::string
text()
const;
190 virtual void setText(
const std::string& text_);
357 virtual std::unique_ptr<TextView>
textView()
const;
377 #if defined(HDI_CORE_AIP_MODE)
636 typedef std::unique_ptr<Label> LabelUP;
637 typedef std::shared_ptr<Label> LabelSP;
638 typedef std::weak_ptr<Label> LabelWP;
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Describes an RGB color, with opacity, typically for UI purposes.
Definition: hdicoreColor.h:32
Allows for image rollover support.
Definition: hdicoreImageIDs.h:220
Label widget, for simply displaying text or images inside a window.
Definition: hdicoreLabel.h:29
virtual void setTextColors(const Color &light_, const Color &dark_)
Sets the colors for the text of the label.
virtual void setDropCallback(const Callback &callback_)
Sets the drop callback for the widget.
virtual bool bold() const
Gets whether the text is bold.
virtual void setBold(const bool bold_)
Sets the font weight.
virtual void setClickCallback(const Callback &callback_)
Sets the click callback for the label.
virtual std::string text() const
Gets the current text value of the label.
virtual SVGWithRolloverIDs svgIDs() const
Gets the SVG resource IDs of the widget.
virtual void setItalic(const bool italic_)
Sets the font style.
virtual void frameColors(Color &light__, Color &dark__) const
Gets the colors for the background of the label frame.
virtual void setFrameShape(const FrameShape shape_)
Sets the shape for the background of the label frame.
virtual void setDroppable(const bool enable_)
Sets whether dropping support for this particular widget is enabled.
virtual void setText(const std::string &text_)
Sets the current text value of the label.
static double idealHeight(const std::string &text_, const double width_, const WindowType containerType_)
Gets the ideal height for a label, given its value and a known width.
virtual void setSVGIDs(const SVGWithRolloverIDs &ids_)
Sets the SVG resource IDs of the widget.
virtual bool droppable() const
Gets whether dropping support for this particular widget is enabled.
virtual void setFrameColors(const Color &light_, const Color &dark_)
Sets the colors for the background of the label frame.
virtual void setImageIDs(const ImageWithRolloverIDs &ids_)
Sets the PNGI resource IDs of the widget.
virtual Callback *const clickCallback() const
Gets the current click callback for the label.
Label(const Rect &frame_, const SVGWithRolloverIDs &svgIDs_, const Size &dims_=Size())
Constructs a static image label.
virtual ImageWithRolloverIDs imageIDs() const
Gets the PNGI resource IDs of the widget.
virtual FrameShape frameShape() const
Gets the shape for the background of the label frame.
virtual Callback *const dropCallback() const
Gets the current drop callback for the widget.
virtual void setBackgroundRollover(const bool ro_)
Sets whether the background of the label should change in appearance upon mouse-over.
virtual ~Label()
Label destructor.
virtual Point droppedPoint() const
Gets the point at which the drop occurred, in the widget's coordinate system.
virtual std::string dragData() const
Gets the data that will be passed when the widget is dropped on a receiver.
virtual std::string droppedData() const
Gets the data that was passed when the widget received a drop.
virtual void removeLinkedPanel()
Removes the panel that should be shown when the label is clicked.
virtual void click()
Simulates a click on the label.
virtual bool backgroundRollover() const
Gets whether the background of the label should change in appearance upon mouse-over.
virtual std::unique_ptr< Panel > linkedPanel() const
Gets the panel that the target label has been associated with.
Label(const Point &loc_, const std::string &title_, const WindowType containerType_)
Constructs a static text label.
Alignment
Text alignment options.
Definition: hdicoreLabel.h:38
virtual Alignment alignment() const
Gets the current alignment of the label.
virtual void removeTextField()
Removes the text field that should be focused when the label is clicked.
Label(const Rect &frame_, const ImageWithRolloverIDs &imageIDs_)
Constructs a static image label.
static double idealWidth(const std::string &text_, const double height_, const WindowType containerType_)
Gets the ideal width for a label, given its value and a known height.
virtual void setDoubleClickCallback(const Callback &callback_)
Sets the double-click callback for the label.
Label(const Point &loc_, const std::string &title_, const double width_)
Constructs a static text label.
virtual bool textColors(Color &light__, Color &dark__) const
Gets the colors for the text of the label.
Label()
Constructs an empty Label object.
virtual void setAlignment(const Alignment alignment_)
Sets the current alignment of the label.
virtual std::unique_ptr< TextView > textView() const
Gets the text view that the target label has been associated with.
virtual void setTextView(TextView &view_)
Sets the text view that should be focused when the label is clicked.
Label(const Label &label_)
Constructs a new Label object from an existing Label object (copy constructor)
virtual void setTextField(TextField &field_)
Sets the text field that should be focused when the label is clicked.
virtual Label * duplicate() const
Convenience method to duplicate a Label object, creating a new and identical UI element to the target...
virtual void setLinkedPanel(const Panel &p_)
Sets the panel that should be shown when the label is clicked.
FrameShape
Background frame shape drawing options.
Definition: hdicoreLabel.h:49
virtual std::unique_ptr< TextField > textField() const
Gets the text field that the target label has been associated with.
virtual void setDraggable(const bool enable_)
Sets whether dragging support for this particular widget is enabled.
virtual Label * clone() const
Convenience method to clone a Label object on the heap.
virtual Label & operator=(const Label &rhs_)
Allows one Label object to be assigned from another.
virtual Callback *const doubleClickCallback() const
Gets the current double-click callback for the label.
virtual void setDragData(const std::string &data_)
Sets the data that will be passed when the widget is dropped on a receiver.
virtual bool italic() const
Gets whether the text is italicized.
virtual bool draggable() const
Gets whether dragging support for this particular widget is enabled.
virtual void doubleClick()
Simulates a double-click on the label.
virtual void removeTextView()
Removes the text view that should be focused when the label is clicked.
Used to add a panel to Illustrator's UI and contain various UI widgets.
Definition: hdicorePanel.h:36
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:38
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Allows for image rollover support.
Definition: hdicoreSVGIDs.h:120
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:25
Text field widget, which allows the user to enter arbitrary text values.
Definition: hdicoreTextField.h:23
Text view widget, which allows the user to enter a large amount of arbitrary text (also useful for di...
Definition: hdicoreTextView.h:24
WindowType
Describes the type of a Window object, allowing for proper casting to its subclass.
Definition: hdicoreTypes.h:822