32 #ifndef TBX_TEXTAREA_H_
33 #define TBX_TEXTAREA_H_
49 enum {TOOLBOX_CLASS = 0x4018};
251 void font(
const std::string &name,
int width,
int height);
int state() const
Return all state flags.
Definition: textarea.h:126
void allow_save(bool value)
Set if saving is allowed in the text area.
Definition: textarea.h:190
This is the base class for all Gadgets.
Definition: gadget.h:48
bool auto_scroll() const
Check if text area will auto scroll.
Definition: textarea.h:218
void get_selecton(int &start, int &end) const
Get location of selection.
Definition: textarea.cc:84
void replace_text(int start, int end, const std::string &text)
Rpelace text in the text area.
Definition: textarea.cc:64
bool allow_load() const
Check if loading from the text area is allowed.
Definition: textarea.h:196
bool has_horizontal_scrollbar() const
Check if text area has a horizontal scroll bar.
Definition: textarea.h:149
TextArea & operator=(const TextArea &other)
Assign a text area to refer to the same underlying toolbox gadget as another.
Definition: textarea.h:89
void allow_load(bool value)
Set if loading is allowed in the text area.
Definition: textarea.h:202
bool has_vertical_scrollbar() const
Check if text area has a vertical scroll bar.
Definition: textarea.h:138
void clipboard(bool value)
Set if clipboard support is used the text area.
Definition: textarea.h:214
bool clipboard() const
Check if this text area supports the clipboard.
Definition: textarea.h:208
void check_toolbox_class(int class_id) const
Check the underlying gadget class for this object has the given class id.
Definition: gadget.cc:47
void wordwrap(bool value)
Set word wrapping in the text area.
Definition: textarea.h:166
int int_property(int property_id) const
Get an integer property from the toolbox Component.
Definition: component.cc:165
int string_property_length(int property_id) const
Get a the length of a string property from the toolbox object.
Definition: component.cc:302
TextArea(const Component &other)
Construct a text area from a gadget.
Definition: textarea.h:83
void font(const std::string &name, int width, int height)
Set the font used for the scroll list items.
Definition: textarea.cc:172
std::string selection_text() const
Get the text of the selection.
Definition: textarea.cc:134
bool allow_selection() const
Check if text area allows a selection to be made.
Definition: textarea.h:172
bool allow_save() const
Check if saving from the text area is allowed.
Definition: textarea.h:184
void state(int state)
Set all state flags.
Definition: textarea.h:131
Class to represent a standard desktop WIMP colour.
Definition: colour.h:146
void auto_scroll(bool value)
Set if text area will auto scroll.
Definition: textarea.h:224
void set_colour(WimpColour foreground, WimpColour background)
Set the colours of the text area using WIMP colours.
Definition: textarea.cc:211
TextArea(const TextArea &other)
Construct a text area from another text area.
Definition: textarea.h:64
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
bool flag_property(int property_id, int flag) const
Check if a particular flag is set in a property.
Definition: component.cc:351
Base class for components in an object.
Definition: component.h:42
int text_length() const
Get the length of the text.
Definition: textarea.h:241
void allow_selection(bool value)
Set if text can be selected in the text area.
Definition: textarea.h:178
TextArea & operator=(const Component &other)
Assign a text area to refer to the same underlying toolbox component as an existing Gadget...
Definition: textarea.h:106
int selection_length() const
Get the length of the selection.
Definition: textarea.cc:117
void text(const std::string &text)
Set the text in the text area.
Definition: textarea.h:231
bool operator!=(const Gadget &other) const
Check if this text area refers to the same underlying toolbox gadget as another gadget.
Definition: textarea.h:120
void has_horizontal_scrollbar(bool value)
Set if text area has a horizontal scroll bar.
Definition: textarea.h:154
std::string string_property(int property_id) const
Get a string property from the toolbox object.
Definition: component.cc:261
void set_selection(int start, int end)
Set the selection.
Definition: textarea.cc:102
void insert_text(int where, const std::string &text)
Insert text into the text area.
Definition: textarea.cc:45
The Window object represents a toolbox window.
Definition: window.h:69
std::string text() const
Get the text from the text area.
Definition: textarea.h:237
void has_vertical_scrollbar(bool value)
Set if text area has a vertical scroll bar.
Definition: textarea.h:143
Class to manipulate a toolbox TextArea gadget.
Definition: textarea.h:46
void system_font(int width, int height)
Set the scroll list to use the system font to display the text.
Definition: textarea.cc:192
bool wordwrap() const
Check if text area is wrapping words.
Definition: textarea.h:160
void get_colour(Colour &foreground, Colour &background) const
Get the colours used in the text area.
Definition: textarea.cc:247
Class to represent a RGB colour.
Definition: colour.h:43
~TextArea()
Destroy a text area gadget.
Definition: textarea.h:57
TextArea & operator=(const Gadget &other)
Assign a text area to refer to the same underlying toolbox gadget as an existing Gadget.
Definition: textarea.h:97
TextArea(const Gadget &other)
Construct a text area from another gadget.
Definition: textarea.h:75
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
void border_size(int value)
Set the size of the border for the text area.
Definition: textarea.h:263
TextArea()
Construct an uninitialised text area.
Definition: textarea.h:51
int _id
Underlying toolbox component id.
Definition: component.h:46
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
bool operator==(const Gadget &other) const
Check if this text area refers to the same underlying toolbox gadget as another gadget.
Definition: textarea.h:113