My Project
|
List view ext. More...
#include <ListViewExt.h>
Public Member Functions | |
CListViewExt (SallyAPI::GUI::CGUIBaseObject *parent, int x, int y, int width, int height, int cols, std::map< int, int > widthList, int controlId=0) | |
Constructor. | |
virtual | ~CListViewExt () |
Destructor. | |
virtual void | Resize (int width, int height) |
Resizes. | |
int | GetScrollbarPosition () |
Gets the scroll bar position. | |
int | GetMaxDisplayedElements () |
Gets the maximum displayed elements. | |
int | GetListSize () |
Gets the list size. | |
void | AddItem (SallyAPI::GUI::CListViewItem listItem, bool updateView=true) |
Adds an item to 'updateView'. | |
bool | RemoveItem (int index) |
Removes the item described by index. | |
void | UpdateView () |
Updates this object. | |
void | Clear () |
Clears this object to its blank/initial state. | |
std::vector < SallyAPI::GUI::CListViewItem * > * | GetListItems () |
Gets the list items. | |
SallyAPI::GUI::CListViewItem * | GetItem (int index) |
Gets the requested item by index. | |
void | SetActive (int index) |
Sets an active. | |
int | GetActive () |
Gets the index of the active element. | |
int | GetStartItem () |
Gets the start item. | |
void | SetStartItem (int startItem) |
Sets a start item. | |
void | ShowScrollbarIfNotScrollable (bool value) |
Shows the scrollbar if not scrollable. | |
bool | IsScrollbarVisibleIfNotScrollbable () |
Query if this object is scrollbar visible if not scrollbable. | |
virtual void | SetAlphaBlending (int alphaBlending) |
Sets an alpha blending. | |
virtual bool | CheckProcessMouseUp (int x, int y) |
Check process mouse up. | |
virtual bool | CheckProcessMouseDown (int x, int y) |
Check process mouse down. | |
virtual void | Enable (bool enable) |
Enables. | |
virtual void | Timer (float timeDelta) |
Timers. | |
virtual void | SendMessageToChilds (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter=NULL) |
Send message to childs. | |
virtual void | SendMessageToParent (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter=NULL) |
Send message to parent. | |
Protected Member Functions | |
void | ResetListView () |
Resets a list view. | |
int | GetMaxItemStart () |
Gets the maximum item start. | |
bool | ResetBox2Object () |
Resets a box 2 object. | |
void | OnCommandScrollbarMoved (SallyAPI::GUI::CGUIBaseObject *reporter, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter) |
Executes the command scrollbar moved action. | |
void | OnCommandDoubleclicked (int reporterId) |
Executes the command doubleclicked action. | |
void | OnCommandMouseMove (SallyAPI::GUI::SendMessage::CParameterBase *messageParameter) |
Executes the command mouse move action. | |
void | OnCommandSorting (SallyAPI::GUI::SendMessage::CParameterBase *messageParameter) |
Executes the command sorting action. | |
void | OnCommandStartDragging (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter) |
Executes the command start dragging action. | |
void | OnCommandItemHoldClicked (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter) |
Executes the command item hold clicked action. | |
virtual void | AddChild (SallyAPI::GUI::CControl *control) |
Adds a child. | |
Protected Attributes | |
std::vector < SallyAPI::GUI::CListViewItem * > | m_vItems |
SallyAPI::GUI::CScrollbar * | m_pScrollbar |
std::map< int, std::map< int, SallyAPI::GUI::CListViewButton * > > | m_mButton |
int | m_iStartItem |
int | m_iCols |
int | m_iRows |
int | m_iActive |
b2World * | m_pb2World |
CBox2DObject * | m_pb2Object |
b2Body * | m_pb2LeftBody |
b2Body * | m_pb2RightBody |
int | m_iOldPositionX |
int | m_iOldPositionY |
std::map< int, int > | m_mWidthList |
bool | m_bSorting |
int | m_iSortingMove |
int | m_iSortingControl |
List view ext.
CListViewExt::CListViewExt | ( | SallyAPI::GUI::CGUIBaseObject * | parent, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
int | cols, | ||
std::map< int, int > | widthList, | ||
int | controlId = 0 |
||
) |
Constructor.
m_iStartItem(0), m_iCols(cols), m_iActive(-1), m_iOldPositionX(0), m_iOldPositionY(0)
[in,out] | parent | If non-null, the parent. |
x | The x coordinate. | |
y | The y coordinate. | |
width | The width. | |
height | The height. | |
cols | The cols. | |
widthList | List of widthes. | |
controlId | Identifier for the control. |
CListViewExt::~CListViewExt | ( | ) | [virtual] |
Destructor.
void CListViewExt::AddChild | ( | SallyAPI::GUI::CControl * | control | ) | [protected, virtual] |
Adds a child.
[in,out] | control | If non-null, the control. |
Reimplemented from SallyAPI::GUI::CForm.
void CListViewExt::AddItem | ( | SallyAPI::GUI::CListViewItem | listItem, |
bool | updateView = true |
||
) |
Adds an item to 'updateView'.
listItem | The list item. |
updateView | true to update view. |
bool CListViewExt::CheckProcessMouseDown | ( | int | x, |
int | y | ||
) | [virtual] |
Check process mouse down.
x | The x coordinate. |
y | The y coordinate. |
Reimplemented from SallyAPI::GUI::CControl.
bool CListViewExt::CheckProcessMouseUp | ( | int | x, |
int | y | ||
) | [virtual] |
Check process mouse up.
x | The x coordinate. |
y | The y coordinate. |
Reimplemented from SallyAPI::GUI::CControl.
void CListViewExt::Clear | ( | ) |
Clears this object to its blank/initial state.
void CListViewExt::Enable | ( | bool | enable | ) | [virtual] |
Enables.
enable | true to enable, false to disable. |
Reimplemented from SallyAPI::GUI::CControl.
int CListViewExt::GetActive | ( | ) |
Gets the index of the active element.
SallyAPI::GUI::CListViewItem * CListViewExt::GetItem | ( | int | index | ) |
Gets the requested item by index.
index | Zero-based index of the. |
std::vector< SallyAPI::GUI::CListViewItem * > * CListViewExt::GetListItems | ( | ) |
Gets the list items.
int CListViewExt::GetListSize | ( | ) |
Gets the list size.
Gets the maximum displayed elements.
int CListViewExt::GetMaxItemStart | ( | ) | [protected] |
Gets the maximum item start.
Gets the scroll bar position.
int CListViewExt::GetStartItem | ( | ) |
Gets the start item.
bool CListViewExt::IsScrollbarVisibleIfNotScrollbable | ( | void | ) |
Query if this object is scrollbar visible if not scrollbable.
void CListViewExt::OnCommandDoubleclicked | ( | int | reporterId | ) | [protected] |
Executes the command doubleclicked action.
reporterId | Identifier for the reporter. |
void CListViewExt::OnCommandItemHoldClicked | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
int | reporterId, | ||
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ||
) | [protected] |
Executes the command item hold clicked action.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
[in,out] | messageParameter | If non-null, the message parameter. |
void CListViewExt::OnCommandMouseMove | ( | SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ) | [protected] |
Executes the command mouse move action.
[in,out] | messageParameter | If non-null, the message parameter. |
void CListViewExt::OnCommandScrollbarMoved | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ||
) | [protected] |
Executes the command scrollbar moved action.
[in,out] | reporter | If non-null, the reporter. |
[in,out] | messageParameter | If non-null, the message parameter. |
void CListViewExt::OnCommandSorting | ( | SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ) | [protected] |
Executes the command sorting action.
[in,out] | messageParameter | If non-null, the message parameter. |
void CListViewExt::OnCommandStartDragging | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
int | reporterId, | ||
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ||
) | [protected] |
Executes the command start dragging action.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
[in,out] | messageParameter | If non-null, the message parameter. |
bool CListViewExt::RemoveItem | ( | int | index | ) |
Removes the item described by index.
index | Zero-based index of the. |
bool CListViewExt::ResetBox2Object | ( | ) | [protected] |
Resets a box 2 object.
void CListViewExt::ResetListView | ( | ) | [protected] |
Resets a list view.
void CListViewExt::Resize | ( | int | width, |
int | height | ||
) | [virtual] |
Resizes.
width | The width. |
height | The height. |
Reimplemented from SallyAPI::GUI::CControl.
void CListViewExt::SendMessageToChilds | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
int | reporterId, | ||
int | messageId, | ||
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter = NULL |
||
) | [virtual] |
Send message to childs.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If non-null, the message parameter. |
Reimplemented from SallyAPI::GUI::CForm.
void CListViewExt::SendMessageToParent | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
int | reporterId, | ||
int | messageId, | ||
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter = NULL |
||
) | [virtual] |
Send message to parent.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If non-null, the message parameter. |
Reimplemented from SallyAPI::GUI::CForm.
void CListViewExt::SetActive | ( | int | index | ) |
Sets an active.
index | Zero-based index of the. |
void CListViewExt::SetAlphaBlending | ( | int | alphaBlending | ) | [virtual] |
Sets an alpha blending.
alphaBlending | The alpha blending. |
Reimplemented from SallyAPI::GUI::CForm.
void CListViewExt::SetStartItem | ( | int | startItem | ) |
Sets a start item.
startItem | The start item. |
void CListViewExt::ShowScrollbarIfNotScrollable | ( | bool | value | ) |
Shows the scrollbar if not scrollable.
value | true to value. |
void CListViewExt::Timer | ( | float | timeDelta | ) | [virtual] |
Timers.
timeDelta | The time delta. |
Reimplemented from SallyAPI::GUI::CForm.
void CListViewExt::UpdateView | ( | ) |
Updates this object.
bool SallyAPI::GUI::CListViewExt::m_bSorting [protected] |
int SallyAPI::GUI::CListViewExt::m_iActive [protected] |
int SallyAPI::GUI::CListViewExt::m_iCols [protected] |
int SallyAPI::GUI::CListViewExt::m_iOldPositionX [protected] |
int SallyAPI::GUI::CListViewExt::m_iOldPositionY [protected] |
int SallyAPI::GUI::CListViewExt::m_iRows [protected] |
int SallyAPI::GUI::CListViewExt::m_iSortingControl [protected] |
int SallyAPI::GUI::CListViewExt::m_iSortingMove [protected] |
int SallyAPI::GUI::CListViewExt::m_iStartItem [protected] |
std::map<int, std::map<int, SallyAPI::GUI::CListViewButton*> > SallyAPI::GUI::CListViewExt::m_mButton [protected] |
std::map<int, int> SallyAPI::GUI::CListViewExt::m_mWidthList [protected] |
b2Body* SallyAPI::GUI::CListViewExt::m_pb2LeftBody [protected] |
CBox2DObject* SallyAPI::GUI::CListViewExt::m_pb2Object [protected] |
b2Body* SallyAPI::GUI::CListViewExt::m_pb2RightBody [protected] |
b2World* SallyAPI::GUI::CListViewExt::m_pb2World [protected] |
std::vector<SallyAPI::GUI::CListViewItem*> SallyAPI::GUI::CListViewExt::m_vItems [protected] |