#include <scim_attribute.h>
Public Member Functions | |
| Attribute (unsigned int start=0, unsigned int length=0, AttributeType type=SCIM_ATTR_NONE, unsigned int value=0) | |
| Constructor. | |
| AttributeType | get_type () const |
| Get the type of this attribute. | |
| unsigned int | get_value () const |
| Get the value of this attribute. | |
| unsigned int | get_start () const |
| Get the start position of this attribute. | |
| unsigned int | get_length () const |
| Get the length of this attribute. | |
| unsigned int | get_end () const |
| Get the end position of this attribute. | |
| void | set_type (AttributeType type) |
| Set the type of this attribute. | |
| void | set_value (unsigned int value) |
| Set the value of this attribute. | |
| void | set_start (unsigned int start) |
| Set the start position of this attribute. | |
| void | set_length (unsigned int length) |
| Set the length of this attribute. | |
The string attributes control the effect of the string drawn by FrontEnds. There are currently four valid types.
A attribute could be one of the following types:
For a DECORATE attribute, it can be one of the following values:
For a FOREGROUND or BACKGROUND attribute, it's a RGB color value generated with SCIM_RGB_COLOR (red,green,blue) macro. You may use SCIM_RGB_COLOR_RED, SCIM_RGB_COLOR_GREEN and SCIM_RGB_COLOR_BLUE to extract the RGB color later.
| scim::Attribute::Attribute | ( | unsigned int | start = 0, |
|
| unsigned int | length = 0, |
|||
| AttributeType | type = SCIM_ATTR_NONE, |
|||
| unsigned int | value = 0 | |||
| ) | [inline] |
Constructor.
| start | - the start position in the string of this attribute. | |
| length | - the length of this attribute, the range is [start,start+length). | |
| type | - the type of this attribute. | |
| value | - the value of this attribute. |
| AttributeType scim::Attribute::get_type | ( | ) | const [inline] |
Get the type of this attribute.
Referenced by scim::operator<().
| unsigned int scim::Attribute::get_value | ( | ) | const [inline] |
Get the value of this attribute.
Referenced by scim::operator<().
| unsigned int scim::Attribute::get_start | ( | ) | const [inline] |
Get the start position of this attribute.
Referenced by scim::operator<().
| unsigned int scim::Attribute::get_length | ( | ) | const [inline] |
Get the length of this attribute.
Referenced by scim::operator<().
| unsigned int scim::Attribute::get_end | ( | ) | const [inline] |
Get the end position of this attribute.
| void scim::Attribute::set_type | ( | AttributeType | type | ) | [inline] |
Set the type of this attribute.
| type | - the new attribute type to be set. |
| void scim::Attribute::set_value | ( | unsigned int | value | ) | [inline] |
Set the value of this attribute.
| value | - the new attribute value to be set. |
| void scim::Attribute::set_start | ( | unsigned int | start | ) | [inline] |
Set the start position of this attribute.
| start | - the new start position in the string. |
| void scim::Attribute::set_length | ( | unsigned int | length | ) | [inline] |
Set the length of this attribute.
| length | - the new length of this attribute. |
1.5.7.1