neoWidgets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Classes | Public Member Functions | List of all members
neo::ListCtrl Class Reference

TODO: needs methods. More...

#include <ControlTypes.h>

Inheritance diagram for neo::ListCtrl:
Inheritance graph
[legend]

Classes

struct  ColumnData
 Used to get or set values of a list column. More...
 
struct  ItemData
 Used to get or set values of a list item. More...
 

Public Member Functions

int AppendColumn (const tstring &text, int format=LVCFMT_LEFT, int width=LVSCW_AUTOSIZE_USEHEADER)
 
int AppendItem (const tstring &text)
 
void AutoSizeColumns (int col=-1)
 
HWND BeginEdit (int index)
 
void Create (HWND parent, const Rect &r, const ControlParam &p=ControlParam())
 
void DeleteColumn (int index)
 
void DeleteItem (int index)
 
void EndEdit ()
 
void EnsureVisible (int index, bool partialOk=false)
 
COLORREF GetBkColor () const
 
void GetColumn (int index, ColumnData &data) const
 
int GetColumnCount () const
 
int GetColumnWidth (int index) const
 
DWORD GetExtendedListStyle () const
 
HeaderCtrl GetHeaderCtrl () const
 
void GetItem (ItemData &data)
 
int GetItemCount () const
 
UINT GetItemState (int index, LPARAM stateMask) const
 
tstring GetItemText (int index, int column=0) const
 
COLORREF GetTextBkColor () const
 
COLORREF GetTextColor () const
 
int InsertColumn (int index, ColumnData &data)
 
int InsertColumn (int index, const tstring &text, int format=LVCFMT_LEFT, int width=LVSCW_AUTOSIZE_USEHEADER)
 
int InsertItem (ItemData &data)
 
int InsertItem (int index, const tstring &text)
 
bool IsItemSelected (int item) const
 
void SelectItem (bool select, int item)
 
void SetBkColor (COLORREF color)
 
void SetColumn (int index, ColumnData &data)
 
void SetColumnWidth (int index, int width)
 
void SetExtendedListStyle (DWORD style)
 
void SetItem (ItemData &data)
 
void SetItem (int index, int column, const tstring &text)
 
void SetItemCount (int count)
 
void SetItemState (int index, UINT state, UINT stateMask)
 
void SetItemText (const tstring &text, int index, int column=0)
 
void SetTextBkColor (COLORREF color)
 
void SetTextColor (COLORREF color)
 
- Public Member Functions inherited from neo::Control
void Create (HWND parent, const tstring &clsName, const tstring &text, const Rect &r, DWORD style, DWORD exStyle, int id, NEO_WINDOW_MODE mode)
 
- Public Member Functions inherited from neo::WindowBase
 WindowBase (const WindowBase &rhs)
 
void Attach (HWND handle, NEO_WINDOW_MODE mode)
 
template<typename MESSAGE >
void Bind (UINT message, void(*function)(MESSAGE &))
 
template<typename MESSAGE , typename FUNCTOR >
void Bind (UINT message, FUNCTOR function)
 
template<typename CLASS , typename MESSAGE , typename HANDLER >
void Bind (UINT message, void(CLASS::*function)(MESSAGE &), HANDLER *handler)
 
template<typename MESSAGE >
void Bind (const MessageId &message, void(*function)(MESSAGE &))
 
template<typename MESSAGE , typename FUNCTOR >
void Bind (const MessageId &message, FUNCTOR function)
 
template<typename CLASS , typename MESSAGE , typename HANDLER >
void Bind (const MessageId &message, void(CLASS::*function)(MESSAGE &), HANDLER *handler)
 
void Clear ()
 
void Create (DWORD exStyle, const tstring &cls, const tstring &text, DWORD style, const Rect &r, HWND parent, HMENU menu, NEO_WINDOW_MODE mode)
 
LRESULT DefaultWndProc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
void Destroy ()
 
void DragAcceptFiles (bool accept=true)
 
void Enable (bool enable)
 
LRESULT GenerateMessage (UINT message, WPARAM wp, LPARAM lp) const
 
Rect GetClientRect () const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
HWND GetHandle () const
 
HICON GetIcon (bool bigIcon) const
 
DWORD GetID () const
 
HMENU GetMenu () const
 
HWND GetParentHandle () const
 
Rect GetRectOnParent () const
 
DWORD GetStyle () const
 
tstring GetText () const
 
Rect GetWindowRect () const
 
void Hide ()
 
bool Invalidate (const RECT *rect=0, bool eraseBkgnd=true)
 
bool IsEnabled () const
 
bool IsMessageHandlerBound (UINT message) const
 
bool IsVisible () const
 
void KillTimer (int timerID)
 
void ModifyStyle (DWORD add, DWORD remove)
 
void Move (int x, int y, bool redraw=true)
 
void Move (const POINT &p, bool redraw=true)
 
void Move (int x, int y, int width, int height, bool redraw=true)
 
void Move (const POINT &p, const SIZE &s, bool redraw=true)
 
void Move (const RECT &r, bool redraw=true)
 
 operator HWND () const
 
WindowBaseoperator= (const WindowBase &rhs)
 
bool Redraw (const RECT *rect=0, HRGN region=0, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
void SetClientSize (int width, int height)
 
HWND SetFocus ()
 
void SetFont (HFONT font, bool redraw=true)
 
HICON SetIcon (HICON icon, bool bigIcon)
 
void SetMenu (HMENU menu)
 
void SetRedraw (bool allowRedraw)
 
void SetText (const tstring &text)
 
UINT_PTR SetTimer (int timerID, UINT interval, TIMERPROC proc=0)
 
void Show (bool show=true)
 
void UnBind (UINT message)
 
void UnBind (const MessageId &message)
 
virtual LRESULT WndProc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 Can be overridden for old school message handling. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from neo::WindowBase
static HCURSOR GetDefaultCursor ()
 
static HFONT GetDefaultFont ()
 
static HICON GetDefaultIcon ()
 
static WindowBaseGetWindowFromHWND (HWND _handle)
 
static void SetDefaultCursor (HCURSOR cursor)
 
static void SetDefaultFont (HFONT font)
 
static void SetDefaultIcon (HICON icon)
 
static LRESULT CALLBACK StaticWndProc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 

Detailed Description

TODO: needs methods.

Member Function Documentation

void neo::ListCtrl::AutoSizeColumns ( int  col = -1)
inline

Automatically sets the required size of one or all columns.

void neo::ListCtrl::EnsureVisible ( int  index,
bool  partialOk = false 
)
inline

Scroll to a specific index

void neo::ListCtrl::GetItem ( ItemData data)
inline
Note
Don't forget to call ItemData::Item().
int neo::ListCtrl::InsertItem ( ItemData data)
inline
Note
Don't forget to call ItemData::Item().
void neo::ListCtrl::SetColumnWidth ( int  index,
int  width 
)
inline
Parameters
widthA fixed width, or a special value:
  • LVSCW_AUTOSIZE
  • LVSCW_AUTOSIZE_USEHEADER
void neo::ListCtrl::SetItem ( ItemData data)
inline
Note
Don't forget to call ItemData::Item().

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