The GroupedList class represents grouped items in a list. List items of GroupedList consist of groups and items. A group represents grouped items and is inserted into the first level as items are inserted into List. Items which are CustomListItem are inserted under related groups. So, items are uniquely identified with two indices: group index and item index.
If an application wants to perform tasks when the state of a list item is changed, it should implement IGroupedItemEventListener and register it to the grouped list, It will then receive related events from GroupedList.
Unlike ExpandableList which is also a list with a hierarchy of depth 2, group item itself does not have many functions.
A typical use case of GroupedList would be a list which groups all items alphabetically.
Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically when the GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat should be deleted by the application.
Refer to CustomListItem and CustomListItemFormat.
Example:
This is the simple UI application that uses a GroupedList control.
// Sample Code for GroupedListSample.h #include <FBase.h> #include <FUi.h> class GroupedListSample : public Osp::Ui::Controls::Form, public Osp::Ui::ICustomItemEventListener { public: GroupedListSample(void) :__pCustomListItemFormat(null){}; protected: static const int ID_LIST_ = 101; static const int ID_LIST_TEXT = 102; static const int ID_LIST_BITMAP = 103; Osp::Graphics::Bitmap* GetBitmapN(void); result AddListItem( Osp::Ui::Controls::GroupedList& groupedList, int groupId, Osp::Base::String itemText, Osp::Graphics::Bitmap* pBitmapNormal, Osp::Graphics::Bitmap* pBitmapFocused); public: virtual result OnInitializing(void); virtual result OnTerminating(void); virtual void OnItemStateChanged(const Osp::Ui::Control& source, int index, int itemId, Osp::Ui::ItemStatus status); virtual void OnItemStateChanged(const Osp::Ui::Control& source, int index, int itemId, int elementId, Osp::Ui::ItemStatus status); private: Osp::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat; }; // Sample Code for CutomListSample.cpp #include "GroupedListSample.h" using namespace Osp::Base; using namespace Osp::Graphics; using namespace Osp::Ui; using namespace Osp::Ui::Controls; result GroupedListSample::OnInitializing(void) { result r = E_SUCCESS; // Create Bitmaps Bitmap *pBitmapNormal = GetBitmapN(); Bitmap *pBitmapFocused = GetBitmapN(); // Create a GroupedList GroupedList* pGroupedList = new GroupedList(); pGroupedList->Construct(Rectangle(0,0,480,500), CUSTOM_LIST_STYLE_NORMAL); // Create an item format of the GroupedList __pCustomListItemFormat = new CustomListItemFormat(); __pCustomListItemFormat->Construct(); __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80)); __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80)); // Add a group to the GroupedList pGroupedList->AddGroup(L"Group_1", null); pGroupedList->AddGroup(L"Group_2", null); // Add an item to the GroupedList AddListItem(*pGroupedList, 0, L"SubItem1", pBitmapNormal, pBitmapFocused); AddListItem(*pGroupedList, 0, L"SubItem2", pBitmapNormal, pBitmapFocused); AddListItem(*pGroupedList, 1, L"SubItem1", pBitmapNormal, pBitmapFocused); AddListItem(*pGroupedList, 1, L"SubItem2", pBitmapNormal, pBitmapFocused); // Add a GroupedList to the Form. AddControl(*pGroupedList); // Display the Form Draw(); Show(); // Deallocate a Bitmap delete pBitmapNormal; delete pBitmapFocused; return r; } result GroupedListSample::OnTerminating(void) { result r = E_SUCCESS; // Deallocate an item format delete __pCustomListItemFormat; return r; } result GroupedListSample::AddListItem(GroupedList& groupedList, int groupId, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused) { result r = E_SUCCESS; // Create an item of the GroupedList CustomListItem* pItem = new CustomListItem(); pItem->Construct(100); pItem->SetItemFormat(*__pCustomListItemFormat); pItem->SetElement(ID_LIST_TEXT, itemText); pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); // Add an item to the GroupedList groupedList.AddItem(groupId, *pItem, ID_LIST_); return r; } Bitmap* GroupedListSample::GetBitmapN(void) { return null; // You should implement GetBitmapN } // Implement an ICustomItemEventListener void GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status) { switch (itemId) { case ID_LIST_: // Todo: break; default: break; } } void GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status) { switch (itemId) { case ID_LIST_: switch (elementId) { case ID_LIST_TEXT: // Todo: break; case ID_LIST_BITMAP: // Todo: break; default: break; } break; default: break; } }
Public Member Functions | |
void | AddFastScrollEventListener (const Osp::Ui::IFastScrollEventListener &listener) |
result | AddGroup (const Osp::Base::String &text, const Osp::Graphics::Bitmap *pBackgroundBitmap, int groupId=LIST_ITEM_UNSPECIFIED_ID) |
void | AddGroupedItemEventListener (const Osp::Ui::IGroupedItemEventListener &listener) |
result | AddItem (int groupIndex, const CustomListItem &item, int itemId=LIST_ITEM_UNSPECIFIED_ID) |
result | Construct (const Osp::Graphics::Rectangle &rect, CustomListStyle style, bool itemDivider=true, bool fastScroll=false) |
result | GetBottomDrawnItemIndex (int &groupIndex, int &itemIndex) const |
result | GetFirstCheckedItemIndex (int &groupIndex, int &itemIndex) const |
int | GetGroupCount (void) const |
int | GetGroupIdAt (int groupIndex) const |
int | GetGroupIndexFromGroupId (int groupId) const |
const CustomListItem * | GetItemAt (int groupIndex, int itemIndex) const |
int | GetItemCountAt (int groupIndex) const |
int | GetItemIdAt (int groupIndex, int itemIndex) const |
result | GetItemIndexFromItemId (int itemId, int &groupIndex, int &itemIndex) const |
result | GetItemIndexFromPosition (const Osp::Graphics::Point &position, int &groupIndex, int &itemIndex) const |
result | GetItemIndexFromPosition (int x, int y, int &groupIndex, int &itemIndex) const |
result | GetLastCheckedItemIndex (int &groupIndex, int &itemIndex) const |
result | GetNextCheckedItemIndexAfter (int &groupIndex, int &itemIndex) const |
Osp::Graphics::Color | GetTextColorOfEmptyList (void) const |
result | GetTopDrawnItemIndex (int &groupIndex, int &itemIndex) const |
GroupedList (void) | |
result | InsertGroupAt (int groupIndex, const Osp::Base::String &text, const Osp::Graphics::Bitmap *pBackgroundBitmap, int groupId=LIST_ITEM_UNSPECIFIED_ID) |
result | InsertItemAt (int groupIndex, int itemIndex, const CustomListItem &item, int itemId=LIST_ITEM_UNSPECIFIED_ID) |
bool | IsItemChecked (int groupIndex, int itemIndex) const |
bool | IsItemEnabled (int groupIndex, int itemIndex) const |
result | RefreshGroup (int groupIndex) |
result | RefreshItem (int groupIndex, int itemIndex) |
result | RemoveAllCheckedItems (void) |
result | RemoveAllCheckedItemsAt (int groupIndex) |
result | RemoveAllGroups (void) |
result | RemoveAllItems (void) |
result | RemoveAllItemsAt (int groupIndex) |
void | RemoveFastScrollEventListener (const Osp::Ui::IFastScrollEventListener &listener) |
result | RemoveGroupAt (int groupIndex) |
void | RemoveGroupedItemEventListener (const Osp::Ui::IGroupedItemEventListener &listener) |
result | RemoveItemAt (int groupIndex, int itemIndex) |
void | ScrollToBottom (void) |
result | ScrollToTop (int groupIndex) |
void | ScrollToTop (void) |
result | ScrollToTop (int groupIndex, int itemIndex) |
result | SetAllItemsChecked (int groupIndex, bool check) |
void | SetBackgroundColor (const Osp::Graphics::Color &color) |
result | SetBounds (int x, int y, int width, int height) |
result | SetBounds (const Osp::Graphics::Rectangle &rect) |
result | SetFastScrollMainIndex (const Osp::Base::String &text) |
result | SetFastScrollSubIndex (const Osp::Base::String &text, FastScrollIndexDigit indexDigit=SCROLL_INDEX_DIGIT_NUM_1) |
result | SetGroupAt (int groupIndex, const Osp::Base::String &text, const Osp::Graphics::Bitmap *pBackgroundBitmap, int groupId=LIST_ITEM_UNSPECIFIED_ID) |
result | SetItemAt (int groupIndex, int itemIndex, const CustomListItem &item, int itemId=LIST_ITEM_UNSPECIFIED_ID) |
result | SetItemChecked (int groupIndex, int itemIndex, bool check) |
result | SetItemEnabled (int groupIndex, int itemIndex, bool enable) |
virtual result | SetSize (int width, int height) |
virtual result | SetSize (const Osp::Graphics::Dimension &size) |
void | SetTextColorOfEmptyList (const Osp::Graphics::Color &color) |
void | SetTextOfEmptyList (const Osp::Base::String &text) |
virtual | ~GroupedList (void) |
Osp::Ui::Controls::GroupedList::GroupedList | ( | void | ) |
This is the default constructor for this class.
virtual Osp::Ui::Controls::GroupedList::~GroupedList | ( | void | ) | [virtual] |
This is the destructor for this class.
void Osp::Ui::Controls::GroupedList::AddFastScrollEventListener | ( | const Osp::Ui::IFastScrollEventListener & | listener | ) |
Adds the fast scroll event listener.
[in] | listener | The listener to be added |
result Osp::Ui::Controls::GroupedList::AddGroup | ( | const Osp::Base::String & | text, |
const Osp::Graphics::Bitmap * | pBackgroundBitmap, | ||
int | groupId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Adds the group to the GroupedList control.
[in] | text | The string of the group to be appended |
[in] | pBackgroundBitmap | The background bitmap of the group |
[in] | groupId | The ID of the group |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::AddGroupedItemEventListener | ( | const Osp::Ui::IGroupedItemEventListener & | listener | ) |
Adds the grouped list item event listener.
[in] | listener | The listener to be added |
result Osp::Ui::Controls::GroupedList::AddItem | ( | int | groupIndex, |
const CustomListItem & | item, | ||
int | itemId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Adds the item to the specified group.
[in] | groupIndex | The group index |
[in] | item | The custom list item object to be added |
[in] | itemId | The specified item ID for this item |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemId is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::Construct | ( | const Osp::Graphics::Rectangle & | rect, |
CustomListStyle | style, | ||
bool | itemDivider = true , |
||
bool | fastScroll = false |
||
) |
Initializes this instance of GroupedList with the specified parameters.
[in] | rect | An instance of the Graphics::Rectangle class This instance represents the X, Y coordinates of the top-left corner of the created GroupedList along with the width and height. |
[in] | style | The style of the GroupedList control |
[in] | itemDivider | Set to true to display an item divider, else false |
[in] | fastScroll | Set to true if to use a fast scroll, else false |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | A specified input parameter is invalid. |
E_INVALID_STATE | This instance has already been constructed. |
E_OUT_OF_MEMORY | The memory is insufficient. |
E_SYSTEM | A system error has occurred. |
0
. result Osp::Ui::Controls::GroupedList::GetBottomDrawnItemIndex | ( | int & | groupIndex, |
int & | itemIndex | ||
) | const |
Returns the index of the current bottom drawn list item.
[out] | groupIndex | The group index of the item |
[out] | itemIndex | The item index of the item |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::GetFirstCheckedItemIndex | ( | int & | groupIndex, |
int & | itemIndex | ||
) | const |
Returns the index of the first checked list item.
[out] | groupIndex | The group index of the item |
[out] | itemIndex | The item index of the item |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
int Osp::Ui::Controls::GroupedList::GetGroupCount | ( | void | ) | const |
Counts all the groups of the GroupedList control.
int Osp::Ui::Controls::GroupedList::GetGroupIdAt | ( | int | groupIndex | ) | const |
Gets the group ID at the specified index.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
int Osp::Ui::Controls::GroupedList::GetGroupIndexFromGroupId | ( | int | groupId | ) | const |
Gets the group index from the specified group ID.
[in] | groupId | The ID of the group |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
const CustomListItem* Osp::Ui::Controls::GroupedList::GetItemAt | ( | int | groupIndex, |
int | itemIndex | ||
) | const |
Gets the specified item of the GroupedList control.
[in] | groupIndex | The index of the group which the item belongs to |
[in] | itemIndex | The index of the item |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
int Osp::Ui::Controls::GroupedList::GetItemCountAt | ( | int | groupIndex | ) | const |
Counts all items of the GroupedList instance.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
int Osp::Ui::Controls::GroupedList::GetItemIdAt | ( | int | groupIndex, |
int | itemIndex | ||
) | const |
Gets the item ID of the item at the specified index.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index in the specified group |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::GetItemIndexFromItemId | ( | int | itemId, |
int & | groupIndex, | ||
int & | itemIndex | ||
) | const |
Gets the item index by the specified item ID.
[in] | itemId | The item ID |
[out] | groupIndex | The group index |
[out] | itemIndex | The item index in the specified group |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::GetItemIndexFromPosition | ( | int | x, |
int | y, | ||
int & | groupIndex, | ||
int & | itemIndex | ||
) | const |
Gets the index of the item at the specified item position.
[in] | x | The x position of the point |
[in] | y | The y position of the point |
[out] | groupIndex | The index of the group which the item belongs to |
[out] | itemIndex | The index of the item |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. There is no item at the specified position. |
result Osp::Ui::Controls::GroupedList::GetItemIndexFromPosition | ( | const Osp::Graphics::Point & | position, |
int & | groupIndex, | ||
int & | itemIndex | ||
) | const |
Gets the index of the item at the specified item position.
[in] | position | The position of the point |
[out] | groupIndex | The index of the group which the item belongs to |
[out] | itemIndex | The index of the item |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. There is no item at the specified position. |
result Osp::Ui::Controls::GroupedList::GetLastCheckedItemIndex | ( | int & | groupIndex, |
int & | itemIndex | ||
) | const |
Gets the index of the last item checked.
[out] | groupIndex | The group index |
[out] | itemIndex | The item index in the specified group |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::GetNextCheckedItemIndexAfter | ( | int & | groupIndex, |
int & | itemIndex | ||
) | const |
Gets the index of the next checked item.
[in,out] | groupIndex | The group index |
[in,out] | itemIndex | The item index in the specified group |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
Osp::Graphics::Color Osp::Ui::Controls::GroupedList::GetTextColorOfEmptyList | ( | void | ) | const |
Gets the color of the text that is displayed when GroupedList is empty.
result Osp::Ui::Controls::GroupedList::GetTopDrawnItemIndex | ( | int & | groupIndex, |
int & | itemIndex | ||
) | const |
Returns the index of the current top drawn list item.
[out] | groupIndex | The group index of the item |
[out] | itemIndex | The item index of the item |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::InsertGroupAt | ( | int | groupIndex, |
const Osp::Base::String & | text, | ||
const Osp::Graphics::Bitmap * | pBackgroundBitmap, | ||
int | groupId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Inserts the group of the GroupedList control at the specified index.
[in] | groupIndex | The group index |
[in] | text | The name of the group item |
[in] | pBackgroundBitmap | The background bitmap of the group item |
[in] | groupId | The ID of the group item |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The groupIndex is out of bounds. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::InsertItemAt | ( | int | groupIndex, |
int | itemIndex, | ||
const CustomListItem & | item, | ||
int | itemId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Inserts the item to the specified group.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index in the specified group |
[in] | item | The custom list item to be inserted |
[in] | itemId | The item ID for this item |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemId is invalid. |
E_SYSTEM | A system error has occurred. |
bool Osp::Ui::Controls::GroupedList::IsItemChecked | ( | int | groupIndex, |
int | itemIndex | ||
) | const |
Checks whether the item at the specified index of this grouped list is checked.
true
if the item is checked, false
[in] | groupIndex | The group index of the item |
[in] | itemIndex | The item index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
bool Osp::Ui::Controls::GroupedList::IsItemEnabled | ( | int | groupIndex, |
int | itemIndex | ||
) | const |
Checks whether the item at the specified index is enabled.
true
if the item is enabled, false
[in] | groupIndex | The group index of the item |
[in] | itemIndex | The item index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RefreshGroup | ( | int | groupIndex | ) |
Draws and shows the group of GroupedList control.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RefreshItem | ( | int | groupIndex, |
int | itemIndex | ||
) |
Draws and shows the item of GroupedList control.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_INVALID_OPERATION | The item has never been drawn before calling this method. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RemoveAllCheckedItems | ( | void | ) |
Removes all the checked items of the GroupedList control.
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RemoveAllCheckedItemsAt | ( | int | groupIndex | ) |
Removes all the checked items in the specified group.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RemoveAllGroups | ( | void | ) |
Removes all the groups of the GroupedList control.
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RemoveAllItems | ( | void | ) |
Removes all the items of the GroupedList control.
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::RemoveAllItemsAt | ( | int | groupIndex | ) |
Removes all the items in the specified group.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::RemoveFastScrollEventListener | ( | const Osp::Ui::IFastScrollEventListener & | listener | ) |
Removes the fast scroll event listener.
[in] | listener | The listener to be removed |
result Osp::Ui::Controls::GroupedList::RemoveGroupAt | ( | int | groupIndex | ) |
Removes the group of the GroupedList control at the index.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::RemoveGroupedItemEventListener | ( | const Osp::Ui::IGroupedItemEventListener & | listener | ) |
Removes the grouped list item event listener.
[in] | listener | The listener to be removed |
result Osp::Ui::Controls::GroupedList::RemoveItemAt | ( | int | groupIndex, |
int | itemIndex | ||
) |
Removes an item in the specified group.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::ScrollToBottom | ( | void | ) |
Scrolls to the bottom of the GroupedList control.
result Osp::Ui::Controls::GroupedList::ScrollToTop | ( | int | groupIndex | ) |
Scrolls to the group at the specified index.
The specified group is drawn at the top of the GroupedList control.
[in] | groupIndex | The group index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::ScrollToTop | ( | void | ) |
Scrolls to the top of the GroupedList.
result Osp::Ui::Controls::GroupedList::ScrollToTop | ( | int | groupIndex, |
int | itemIndex | ||
) |
Scrolls to the item at the specified index.
The specified item is drawn at the top of the GroupedList control.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetAllItemsChecked | ( | int | groupIndex, |
bool | check | ||
) |
Sets the checked status of all the items of the specified group with the given value.
[in] | groupIndex | The group index of the item |
[in] | check | Set to true to check all the items, else false |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
void Osp::Ui::Controls::GroupedList::SetBackgroundColor | ( | const Osp::Graphics::Color & | color | ) |
Sets the background color of this control.
[in] | color | The background color |
result Osp::Ui::Controls::GroupedList::SetBounds | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) | [virtual] |
Sets the position and size of the control.
The position is set at (x, y), and the width
and height
parameters contain the width and height values of the control, respectively.
[in] | x | The x coordinate |
[in] | y | The y coordinate |
[in] | width | The width |
[in] | height | The height |
E_SUCCESS | The method is successful. |
E_INVALID_OPERATION | The control has not been constructed as yet. |
E_INVALID_STATE | This instance is in an invalid state. |
E_UNSUPPORTED_OPERATION | This method is not supported because this control is neither movable nor resizable. |
E_INVALID_ARG | A specified input parameter is invalid. Either dim.width or dim.height is out of the range as defined by the minimum and maximum size. |
E_SYSTEM | A system error has occurred. |
Reimplemented from Osp::Ui::Control.
result Osp::Ui::Controls::GroupedList::SetBounds | ( | const Osp::Graphics::Rectangle & | rect | ) | [virtual] |
Sets the position and size of the control.
[in] | rect | The bounds of the control |
E_SUCCESS | The method is successful. |
E_INVALID_OPERATION | The control has not been constructed as yet. |
E_INVALID_STATE | This instance is in an invalid state. |
E_UNSUPPORTED_OPERATION | The method is not supported because this control is neither movable nor resizable. |
E_INVALID_ARG | The specified input parameter is invalid. Either dim.width or dim.height is out of the range as defined by the minimum and maximum size. |
E_SYSTEM | A system error has occurred. |
Reimplemented from Osp::Ui::Control.
result Osp::Ui::Controls::GroupedList::SetFastScrollMainIndex | ( | const Osp::Base::String & | text | ) |
Sets the first index list of scroll by text.
[in] | text | The text of the first index |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetFastScrollSubIndex | ( | const Osp::Base::String & | text, |
FastScrollIndexDigit | indexDigit = SCROLL_INDEX_DIGIT_NUM_1 |
||
) |
Sets the second index list of scroll by text.
[in] | text | The text of the second index Separate each second index of the first index by ',';. |
[in] | indexDigit | The index digit count |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetGroupAt | ( | int | groupIndex, |
const Osp::Base::String & | text, | ||
const Osp::Graphics::Bitmap * | pBackgroundBitmap, | ||
int | groupId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Sets the contents of the group of the GroupedList control at the index.
[in] | groupIndex | The group index |
[in] | text | The string of the group to be appended |
[in] | pBackgroundBitmap | The bitmap of the group |
[in] | groupId | The ID of the group |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetItemAt | ( | int | groupIndex, |
int | itemIndex, | ||
const CustomListItem & | item, | ||
int | itemId = LIST_ITEM_UNSPECIFIED_ID |
||
) |
Sets the contents of the item in the specified group.
[in] | groupIndex | The group index |
[in] | itemIndex | The item index in the specified group |
[in] | item | The custom list item to be set |
[in] | itemId | The item ID for this item |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemId is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetItemChecked | ( | int | groupIndex, |
int | itemIndex, | ||
bool | check | ||
) |
Sets the checked status for the specified item.
[in] | groupIndex | The group index of the item |
[in] | itemIndex | The item index |
[in] | check | Set to true to check the item, else false |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
result Osp::Ui::Controls::GroupedList::SetItemEnabled | ( | int | groupIndex, |
int | itemIndex, | ||
bool | enable | ||
) |
Enables the specified item.
[in] | groupIndex | The group index of the item |
[in] | itemIndex | The item index |
[in] | enable | Set to true to enable the item, else false |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The specified groupIndex or itemIndex is invalid. |
E_SYSTEM | A system error has occurred. |
virtual result Osp::Ui::Controls::GroupedList::SetSize | ( | int | width, |
int | height | ||
) | [virtual] |
Sets the size of the control.
[in] | width | The width of the control |
[in] | height | The height of the control |
E_SUCCESS | The method is successful. |
E_INVALID_OPERATION | The control has not been constructed as yet. |
E_INVALID_STATE | This instance is in an invalid state. |
E_UNSUPPORTED_OPERATION | The method is not supported because this control is not resizable. |
E_INVALID_ARG | A specified input parameter is invalid. Either dim.width or dim.height is out of the range as defined by the minimum and maximum size. |
E_SYSTEM | A system error has occurred. |
Reimplemented from Osp::Ui::Control.
virtual result Osp::Ui::Controls::GroupedList::SetSize | ( | const Osp::Graphics::Dimension & | size | ) | [virtual] |
Sets the size of the control.
[in] | size | The size of the control |
E_SUCCESS | The method is successful. |
E_INVALID_OPERATION | The control has not been constructed as yet. |
E_INVALID_STATE | This instance is in an invalid state. |
E_UNSUPPORTED_OPERATION | This method is not supported because this control is not resizable. |
E_INVALID_ARG | The specified input parameter is invalid. Either dim.width or dim.height is out of the range as defined by the minimum and maximum size. |
E_SYSTEM | A system error has occurred. |
Reimplemented from Osp::Ui::Control.
void Osp::Ui::Controls::GroupedList::SetTextColorOfEmptyList | ( | const Osp::Graphics::Color & | color | ) |
Sets the color of the text that is displayed when GroupedList is empty.
[in] | color | The color of the text to be displayed |
void Osp::Ui::Controls::GroupedList::SetTextOfEmptyList | ( | const Osp::Base::String & | text | ) |
Sets the text that is displayed when GroupedList is empty.
[in] | text | The empty list test |