scim::Attribute Class Reference
[Helper]
Class to store the string attributes.
More...
#include <scim_attribute.h>
List of all members.
|
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.
|
Detailed Description
Class to store the string attributes.
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:
- SCIM_ATTR_NONE No attribute
- SCIM_ATTR_DECORATE Decorate attribute, eg. underline, highlight etc.
- SCIM_ATTR_FOREGROUND Foreground color attribute, in RGB format.
- SCIM_ATTR_BACKGROUND Background color attribute, in RGB format.
For a DECORATE attribute, it can be one of the following values:
- SCIM_ATTR_DECORATE_NONE No decorate
- SCIM_ATTR_DECORATE_UNDERLINE Underline
- SCIM_ATTR_DECORATE_HIGHLIGHT Highlight
- SCIM_ATTR_DECORATE_REVERSE Reverse
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.
Definition at line 92 of file scim_attribute.h.
Constructor & Destructor Documentation
scim::Attribute::Attribute |
( |
unsigned int |
start = 0 , |
|
|
unsigned int |
length = 0 , |
|
|
AttributeType |
type = SCIM_ATTR_NONE , |
|
|
unsigned int |
value = 0 |
|
) |
[inline] |
|
|
Constructor.
- Parameters:
-
| 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. |
Definition at line 109 of file scim_attribute.h. |
Member Function Documentation
unsigned int scim::Attribute::get_value |
( |
|
) |
const [inline] |
|
|
Get the value of this attribute.
- Returns:
- The value of this attribute.
Definition at line 128 of file scim_attribute.h. |
unsigned int scim::Attribute::get_start |
( |
|
) |
const [inline] |
|
|
Get the start position of this attribute.
- Returns:
- The start position of this attribute in the string.
Definition at line 134 of file scim_attribute.h. |
unsigned int scim::Attribute::get_length |
( |
|
) |
const [inline] |
|
|
Get the length of this attribute.
- Returns:
- The length of this attribute in the string.
Definition at line 140 of file scim_attribute.h. |
unsigned int scim::Attribute::get_end |
( |
|
) |
const [inline] |
|
|
Get the end position of this attribute.
- Returns:
- The end position of this attribute.
Definition at line 146 of file scim_attribute.h. |
|
Set the type of this attribute.
- Parameters:
-
| type | - the new attribute type to be set. |
Definition at line 152 of file scim_attribute.h. |
void scim::Attribute::set_value |
( |
unsigned int |
value |
) |
[inline] |
|
|
Set the value of this attribute.
- Parameters:
-
| value | - the new attribute value to be set. |
Definition at line 158 of file scim_attribute.h. |
void scim::Attribute::set_start |
( |
unsigned int |
start |
) |
[inline] |
|
|
Set the start position of this attribute.
- Parameters:
-
| start | - the new start position in the string. |
Definition at line 164 of file scim_attribute.h. |
void scim::Attribute::set_length |
( |
unsigned int |
length |
) |
[inline] |
|
|
Set the length of this attribute.
- Parameters:
-
| length | - the new length of this attribute. |
Definition at line 170 of file scim_attribute.h. |
The documentation for this class was generated from the following file:
Generated on Thu Dec 30 21:03:19 2004 for scim by
1.3.8