12 #ifndef __UN_StickyNoteUtils_h__
13 #define __UN_StickyNoteUtils_h__
20 namespace UN_StickyNoteUtils
25 isValid(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
27 return graph_data && graph_data->
isValid( sticky_note_id );
32 setName(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
41 name(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
50 setText(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
59 text(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
68 setPosition(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
77 position(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
86 setDimensions(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
91 sticky_note_id, dimensions );
96 dimensions(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
105 setColor(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
114 color(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
123 setTextColor(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
132 textColor(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
141 setTextSize(
UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id,
151 textSize(
const UN_GraphData *graph_data, UN_StickyNoteID sticky_note_id )
161 UN_StickyNoteID sticky_note_id,
bool is_collapsed )
165 sticky_note_id, is_collapsed );
171 UN_StickyNoteID sticky_note_id )
182 UN_StickyNoteID sticky_note_id,
bool is_hidden )
186 sticky_note_id, is_hidden );
193 UN_StickyNoteID sticky_note_id )
void setColor(UN_StickyNoteID note_id, const UT_Color &color)
Sets the sticky notes's background color in the graph editor.
static const auto theDefTextSize
static const auto theDefCollapsed
static const auto theDefPos
void setStickyNoteName(UN_StickyNoteID sticky_note, const UT_StringRef &name)
Sets the name of the given sticky note.
static const UT_StringHolder theDefText
const UT_Color & textColor(UN_StickyNoteID note_id) const
Returns the sticky note's text (foreground) color in the graph editor.
const UT_Vector2D & position(UN_StickyNoteID note_id) const
Returns the sticky note's position in the graph editor.
const UT_StringHolder & name(UN_StickyNoteID note_id) const
Returns the name that identifies the sticky notes among its siblings.
const UT_Vector2D & dimensions(UN_StickyNoteID note_id) const
Returns the sticky note's dimensions (width & height).
bool isValid(UN_NodeID node) const
void setBackgroundHidden(UN_StickyNoteID note_id, bool is_hidden)
void setText(UN_StickyNoteID note_id, const UT_StringRef &text)
Sets the sticky note's contents text.
static const UT_StringHolder theEmptyString
ROI OIIO_API text_size(string_view text, int fontsize=16, string_view fontname="")
void setPosition(UN_StickyNoteID note_id, const UT_Vector2D &position)
Sets the sticky note's location in the graph editor.
GLuint const GLchar * name
const UT_StringHolder & text(UN_StickyNoteID note_id) const
Returns the sticky note's contents.
static const auto theDefBackgroundHidden
UN_StickyNoteData & stickyNoteData()
Returns the container of data for the sticky notes in the graph.
static const auto theDefTextColor
void setDimensions(UN_StickyNoteID note_id, const UT_Vector2D &dimensions)
Sets the sticky note's width and height.
void setTextColor(UN_StickyNoteID note_id, const UT_Color &text_color)
Sets the sticky notes's text (foreground) color in the graph editor.
const UT_Color & color(UN_StickyNoteID note_id) const
Returns the sticky note's background color in the graph editor.
void setCollapsed(UN_StickyNoteID note_id, bool is_collapsed)
Sets the sticky note's collapsed (minimized) state.
static const auto theDefColor
bool isBackgroundHidden(UN_StickyNoteID note_id) const
bool isCollapsed(UN_StickyNoteID note_id) const
Returns true if the sticky note is collapsed (minimized).
float textSize(UN_StickyNoteID note_id) const
Returns the sticky note's text size.
static const auto theDefDim
void setTextSize(UN_StickyNoteID note_id, float text_size)
Sets the sticky note's text size.