Public Member Functions
Osp::Ui::Controls::GroupedList Class Reference
Inheritance diagram for Osp::Ui::Controls::GroupedList:
Osp::Ui::Control Osp::Base::Object

Deprecated:
This class is deprecated. Instead of using this class, use GroupedListView class.
Since:
1.0

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:

GUI_groupedlist.png

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;
    }
}

List of all members.

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 CustomListItemGetItemAt (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)

Constructor & Destructor Documentation

Osp::Ui::Controls::GroupedList::GroupedList ( void  )

This is the default constructor for this class.

Since:
1.0
virtual Osp::Ui::Controls::GroupedList::~GroupedList ( void  ) [virtual]

This is the destructor for this class.

Since:
1.0

Member Function Documentation

void Osp::Ui::Controls::GroupedList::AddFastScrollEventListener ( const Osp::Ui::IFastScrollEventListener listener)

Adds the fast scroll event listener.

Since:
1.0
Parameters:
[in]listenerThe 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]textThe string of the group to be appended
[in]pBackgroundBitmapThe background bitmap of the group
[in]groupIdThe ID of the group
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
void Osp::Ui::Controls::GroupedList::AddGroupedItemEventListener ( const Osp::Ui::IGroupedItemEventListener listener)

Adds the grouped list item event listener.

Since:
1.0
Parameters:
[in]listenerThe 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemThe custom list item object to be added
[in]itemIdThe specified item ID for this item
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemId is invalid.
E_SYSTEMA system error has occurred.
Remarks:
The added item is deleted automatically when the list is destroyed.
Do not add, insert, or set an item that already belongs to a GroupedList control.
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.

Since:
1.0
Compatibility:
This method has compatibility issues with different bada API versions.
For more information, see 1.2 and 2.0.
Returns:
An error code
Parameters:
[in]rectAn 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]styleThe style of the GroupedList control
[in]itemDividerSet to true to display an item divider,
else false
[in]fastScrollSet to true if to use a fast scroll,
else false
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGA specified input parameter is invalid.
E_INVALID_STATEThis instance has already been constructed.
E_OUT_OF_MEMORYThe memory is insufficient.
E_SYSTEMA system error has occurred.
Remarks:
In bada API versions prior to 2.0, the width and the height of the control must be greater than 0.
From bada API version 2.0, the size of the control must be within the range as defined by the minimum and maximum size.
The minimum size of this control is 274 x 148 on a WVGA screen, 180 x 96 on a HVGA screen and 137 x 74 on a WQVGA screen.
result Osp::Ui::Controls::GroupedList::GetBottomDrawnItemIndex ( int &  groupIndex,
int &  itemIndex 
) const

Returns the index of the current bottom drawn list item.

Since:
1.0
Returns:
An error code
Parameters:
[out]groupIndexThe group index of the item
[out]itemIndexThe item index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::GetFirstCheckedItemIndex ( int &  groupIndex,
int &  itemIndex 
) const

Returns the index of the first checked list item.

Since:
1.0
Returns:
An error code
Parameters:
[out]groupIndexThe group index of the item
[out]itemIndexThe item index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
int Osp::Ui::Controls::GroupedList::GetGroupCount ( void  ) const

Counts all the groups of the GroupedList control.

Since:
1.0
Returns:
The count of all the groups
int Osp::Ui::Controls::GroupedList::GetGroupIdAt ( int  groupIndex) const

Gets the group ID at the specified index.

Since:
1.0
Returns:
The group ID
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
int Osp::Ui::Controls::GroupedList::GetGroupIndexFromGroupId ( int  groupId) const

Gets the group index from the specified group ID.

Since:
1.0
Returns:
The group index
Parameters:
[in]groupIdThe ID of the group
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
const CustomListItem* Osp::Ui::Controls::GroupedList::GetItemAt ( int  groupIndex,
int  itemIndex 
) const

Gets the specified item of the GroupedList control.

Since:
1.0
Returns:
A custom list item
Parameters:
[in]groupIndexThe index of the group which the item belongs to
[in]itemIndexThe index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
int Osp::Ui::Controls::GroupedList::GetItemCountAt ( int  groupIndex) const

Counts all items of the GroupedList instance.

Since:
1.0
Returns:
The item count of the specified group
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA 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.

Since:
1.0
Returns:
The item ID
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index in the specified group
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]itemIdThe item ID
[out]groupIndexThe group index
[out]itemIndexThe item index in the specified group
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]xThe x position of the point
[in]yThe y position of the point
[out]groupIndexThe index of the group which the item belongs to
[out]itemIndexThe index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]positionThe position of the point
[out]groupIndexThe index of the group which the item belongs to
[out]itemIndexThe index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[out]groupIndexThe group index
[out]itemIndexThe item index in the specified group
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::GetNextCheckedItemIndexAfter ( int &  groupIndex,
int &  itemIndex 
) const

Gets the index of the next checked item.

Since:
1.0
Returns:
An error code
Parameters:
[in,out]groupIndexThe group index
[in,out]itemIndexThe item index in the specified group
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Compatibility:
This method has compatibility issues with bada API versions prior to 2.0.
For more information, see here.
Returns:
The color of the text to be displayed
result Osp::Ui::Controls::GroupedList::GetTopDrawnItemIndex ( int &  groupIndex,
int &  itemIndex 
) const

Returns the index of the current top drawn list item.

Since:
1.0
Returns:
An error code
Parameters:
[out]groupIndexThe group index of the item
[out]itemIndexThe item index of the item
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]textThe name of the group item
[in]pBackgroundBitmapThe background bitmap of the group item
[in]groupIdThe ID of the group item
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe groupIndex is out of bounds.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index in the specified group
[in]itemThe custom list item to be inserted
[in]itemIdThe item ID for this item
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemId is invalid.
E_SYSTEMA system error has occurred.
Remarks:
The inserted item is deleted automatically when the list is destroyed. Do not add, insert, or set an item that already belongs to a GroupedList control.
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.

Since:
1.0
Returns:
true if the item is checked,
else false
Parameters:
[in]groupIndexThe group index of the item
[in]itemIndexThe item index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
Remarks:
This method can only be used when the style of the list allows selection.
bool Osp::Ui::Controls::GroupedList::IsItemEnabled ( int  groupIndex,
int  itemIndex 
) const

Checks whether the item at the specified index is enabled.

Since:
1.0
Returns:
true if the item is enabled,
else false
Parameters:
[in]groupIndexThe group index of the item
[in]itemIndexThe item index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::RefreshGroup ( int  groupIndex)

Draws and shows the group of GroupedList control.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::RefreshItem ( int  groupIndex,
int  itemIndex 
)

Draws and shows the item of GroupedList control.

Since:
1.0
Compatibility:
This method has compatibility issues with bada API versions prior to 2.0.
For more information, see here.
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_INVALID_OPERATIONThe item has never been drawn before calling this method.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::RemoveAllCheckedItems ( void  )

Removes all the checked items of the GroupedList control.

Since:
1.0
Returns:
An error code
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
Remarks:
The removed list items are deleted from the memory.
result Osp::Ui::Controls::GroupedList::RemoveAllCheckedItemsAt ( int  groupIndex)

Removes all the checked items in the specified group.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
Remarks:
The removed list items are deleted from the memory.
result Osp::Ui::Controls::GroupedList::RemoveAllGroups ( void  )

Removes all the groups of the GroupedList control.

Since:
1.0
Returns:
An error code
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
Remarks:
When the specified group is removed, all the items in the group are also removed.
The removed list items are deleted from the memory.
result Osp::Ui::Controls::GroupedList::RemoveAllItems ( void  )

Removes all the items of the GroupedList control.

Since:
1.0
Returns:
An error code
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA system error has occurred.
Remarks:
The removed list items are deleted from the memory.
result Osp::Ui::Controls::GroupedList::RemoveAllItemsAt ( int  groupIndex)

Removes all the items in the specified group.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
Remarks:
The removed list items are deleted from the memory.
void Osp::Ui::Controls::GroupedList::RemoveFastScrollEventListener ( const Osp::Ui::IFastScrollEventListener listener)

Removes the fast scroll event listener.

Since:
1.0
Parameters:
[in]listenerThe listener to be removed
result Osp::Ui::Controls::GroupedList::RemoveGroupAt ( int  groupIndex)

Removes the group of the GroupedList control at the index.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
Remarks:
When the specified group is removed, all the items in the group are also removed.
The removed list items are deleted from the memory.
void Osp::Ui::Controls::GroupedList::RemoveGroupedItemEventListener ( const Osp::Ui::IGroupedItemEventListener listener)

Removes the grouped list item event listener.

Since:
1.0
Parameters:
[in]listenerThe listener to be removed
result Osp::Ui::Controls::GroupedList::RemoveItemAt ( int  groupIndex,
int  itemIndex 
)

Removes an item in the specified group.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
Remarks:
The removed list item is deleted from the memory.
void Osp::Ui::Controls::GroupedList::ScrollToBottom ( void  )

Scrolls to the bottom of the GroupedList control.

Since:
1.0
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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
void Osp::Ui::Controls::GroupedList::ScrollToTop ( void  )

Scrolls to the top of the GroupedList.

Since:
1.0
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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index of the item
[in]checkSet to true to check all the items,
else false
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA system error has occurred.
void Osp::Ui::Controls::GroupedList::SetBackgroundColor ( const Osp::Graphics::Color color)

Sets the background color of this control.

Since:
1.1
Parameters:
[in]colorThe 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.

Since:
1.0
Compatibility:
This method has compatibility issues with different bada API versions.
For more information, see 1.2 and 2.0.
Returns:
An error code
Parameters:
[in]xThe x coordinate
[in]yThe y coordinate
[in]widthThe width
[in]heightThe height
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_OPERATIONThe control has not been constructed as yet.
E_INVALID_STATEThis instance is in an invalid state.
E_UNSUPPORTED_OPERATIONThis method is not supported because this control is neither movable nor resizable.
E_INVALID_ARGA 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_SYSTEMA system error has occurred.
Remarks:
Do not override this method.
See also:
IsMovable()
IsResizable()
GetMinimumSize()
GetMaximumSize()
SetPosition()
SetSize()

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.

Since:
1.0
Compatibility:
This method has compatibility issues with different bada API versions.
For more information, see 1.2 and 2.0.
Returns:
An error code
Parameters:
[in]rectThe bounds of the control
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_OPERATIONThe control has not been constructed as yet.
E_INVALID_STATEThis instance is in an invalid state.
E_UNSUPPORTED_OPERATIONThe method is not supported because this control is neither movable nor resizable.
E_INVALID_ARGThe 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_SYSTEMA system error has occurred.
Remarks:
Do not override this method.
See also:
IsMovable()
IsResizable()
GetMinimumSize()
GetMaximumSize()
SetPosition()
SetSize()

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.

Since:
1.0
Returns:
An error code
Parameters:
[in]textThe text of the first index
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]textThe text of the second index
Separate each second index of the first index by ',';.
[in]indexDigitThe index digit count
Exceptions:
E_SUCCESSThe method is successful.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]textThe string of the group to be appended
[in]pBackgroundBitmapThe bitmap of the group
[in]groupIdThe ID of the group
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex is invalid.
E_SYSTEMA 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.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index
[in]itemIndexThe item index in the specified group
[in]itemThe custom list item to be set
[in]itemIdThe item ID for this item
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemId is invalid.
E_SYSTEMA system error has occurred.
Remarks:
Do not add, insert, or set an item that already belongs to a GroupedList control.
result Osp::Ui::Controls::GroupedList::SetItemChecked ( int  groupIndex,
int  itemIndex,
bool  check 
)

Sets the checked status for the specified item.

Since:
1.0
Compatibility:
This method has compatibility issues with bada API versions prior to 1.2.
For more information, see here.
Returns:
An error code
Parameters:
[in]groupIndexThe group index of the item
[in]itemIndexThe item index
[in]checkSet to true to check the item,
else false
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
result Osp::Ui::Controls::GroupedList::SetItemEnabled ( int  groupIndex,
int  itemIndex,
bool  enable 
)

Enables the specified item.

Since:
1.0
Returns:
An error code
Parameters:
[in]groupIndexThe group index of the item
[in]itemIndexThe item index
[in]enableSet to true to enable the item,
else false
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_ARGThe specified groupIndex or itemIndex is invalid.
E_SYSTEMA system error has occurred.
virtual result Osp::Ui::Controls::GroupedList::SetSize ( int  width,
int  height 
) [virtual]

Sets the size of the control.

Since:
1.0
Compatibility:
This method has compatibility issues with different bada API versions.
For more information, see 1.2 and 2.0.
Returns:
An error code
Parameters:
[in]widthThe width of the control
[in]heightThe height of the control
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_OPERATIONThe control has not been constructed as yet.
E_INVALID_STATEThis instance is in an invalid state.
E_UNSUPPORTED_OPERATIONThe method is not supported because this control is not resizable.
E_INVALID_ARGA 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_SYSTEMA system error has occurred.
Remarks:
Do not override this method.
See also:
IsResizable()
GetMinimumSize()
GetMaximumSize()

Reimplemented from Osp::Ui::Control.

virtual result Osp::Ui::Controls::GroupedList::SetSize ( const Osp::Graphics::Dimension size) [virtual]

Sets the size of the control.

Since:
1.0
Compatibility:
This method has compatibility issues with different bada API versions.
For more information, see 1.2 and 2.0.
Returns:
An error code
Parameters:
[in]sizeThe size of the control
Exceptions:
E_SUCCESSThe method is successful.
E_INVALID_OPERATIONThe control has not been constructed as yet.
E_INVALID_STATEThis instance is in an invalid state.
E_UNSUPPORTED_OPERATIONThis method is not supported because this control is not resizable.
E_INVALID_ARGThe 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_SYSTEMA system error has occurred.
Remarks:
Do not override this method.
See also:
IsResizable()
GetMinimumSize()
GetMaximumSize()

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.

Since:
1.0
Compatibility:
This method has compatibility issues with bada API versions prior to 2.0.
For more information, see here.
Parameters:
[in]colorThe 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.

Since:
1.0
Parameters:
[in]textThe empty list test

The documentation for this class was generated from the following file:

Copyright © 2011 Samsung Electronics Co., Ltd. All rights reserved.