13#if !defined(OWL_LISTVIEWCTRL_H)
14#define OWL_LISTVIEWCTRL_H
16#if defined(BI_HAS_PRAGMA_ONCE)
58 auto SetWrap(
bool wrap =
true) ->
void;
77 :
public LVHITTESTINFO
97 { Init(); SetPoint(p); }
105 { *
static_cast<LVHITTESTINFO*
>(
this) =
info; }
155 {
pt.x = p.x;
pt.y = p.y; }
230 auto GetText() const ->
LPCTSTR;
239 auto GetIndex() const ->
int;
240 auto SetIndex(
int index) ->
void;
246 auto GetSubItem() const ->
int;
260 auto GetImageIndex() const ->
int;
267 auto GetState() const ->
int;
268 auto SetState(TListState state) ->
void;
274 auto GetStateImage() const ->
int;
281 auto GetIndent() const ->
int;
348 auto SetFormat(TFormat
how) ->
void;
356 auto GetText() const ->
LPCTSTR;
357 auto GetFormat() const -> TFormat;
358 auto GetWidth() const ->
int;
359 auto GetSubItem() const ->
int;
365 auto GetImage() const ->
int;
367 auto GetOrder() const ->
int;
421 auto SetTileSize(
const TSize& size) ->
void;
422 auto SetSizeAutomatic() ->
void;
425 auto RemoveMaxTextLines() ->
void;
427 auto RemoveLabelMargin() ->
void;
503 :
public LVFOOTERINFO
515 {
memset(
static_cast<LVFOOTERINFO*
>(
this), 0,
sizeof(LVFOOTERINFO)); }
523 { *
static_cast<LVFOOTERINFO*
>(
this) =
info; }
537 :
public LVFOOTERITEM
558 {
memset(
static_cast<LVFOOTERITEM*
>(
this), 0,
sizeof(LVFOOTERITEM)); }
566 { *
static_cast<LVFOOTERITEM*
>(
this) = item; }
721 auto GetColumnWidth(
int colNum)
const ->
int;
723 auto SetColumnWidth(
int colNum,
int width) ->
bool;
733 auto GetItemCount() const ->
int;
735 auto GetItemPosition(
int index,
TPoint&
pt) const ->
bool;
736 auto GetItemPosition(
int index) const ->
TPoint;
737 auto SetItemPosition(
int index, const
TPoint&
pt) ->
bool;
738 auto SetItemPosition32(
int index, const
TPoint&
pt) ->
void;
743 auto GetItemText(
int index,
TLvItem& item) const ->
int;
746 auto SetItemText(
int index, const
TLvItem& item) ->
bool;
756 auto InsertItem(const
TLvItem& item,
int index = -1) ->
int;
758 auto DeleteItem(
int index) ->
bool;
759 auto DeleteAllItems() ->
bool;
774 auto IsSelected(
int index) const ->
bool;
775 auto GetNextSelIndex(
int index = -1) const ->
int;
776 auto GetSelIndex() const ->
int;
777 auto GetSelCount(
void) const ->
int;
782 auto SetSel(
int index,
bool select) ->
bool;
784 auto SetSelItemRange(
bool select,
int first,
int last) ->
bool;
785 auto GetSelectedColumn() const ->
int;
811 auto GetCallBackMask() const ->
TLvItem::TListState;
818 auto GetTopIndex() const ->
int;
820 auto GetEditControl() const ->
HWND;
821 auto CancelEditLabel() ->
void;
822 auto Update(
int index) ->
bool;
825 auto Scroll(
int dx,
int dy) ->
bool;
832 auto IsItemVisible(
int index) const ->
bool;
835 auto GetCountPerPage() const ->
int;
837 auto GetFocusItem() ->
int;
844 auto GetApproxRect(
int x = -1,
int y = -1,
int count = -1) const ->
TSize;
850 {
return GetApproxRect(
pt.x,
pt.y, count); }
852 auto GetColumnOrder(
int count,
int* array)
const ->
bool;
853 auto SetColumnOrder(
int count,
const int* array) ->
bool;
854 auto GetExtStyle() const ->
uint32;
859 auto GetHotItem() const ->
int;
860 auto SetHotItem(
int index) ->
int;
865 auto SetIconSpacing(
int x,
int y) ->
TSize;
871 {
return SetIconSpacing(
pt.x,
pt.y); }
879 {
return SetIconSpacing(-1, -1); }
887 auto GetHoverTime() const ->
uint32;
889 auto GetNumOfWorkAreas() const ->
uint;
892 auto GetSelectionMark() const ->
int;
893 auto SetSelectionMark(
int index) ->
int;
900 auto GetNextItemIndex(
int index,
int group,
uint flags = TNextItemCode::All) const ->
int;
904 auto GetFooterItems() const ->
int;
906 auto GetFooterItemText(
int index) const -> std::wstring;
908 auto GetFooterItemRect(
int index,
TRect&
rect) const ->
bool;
909 auto GetFooterItemRect(
int index) const ->
TRect;
918 auto GetUnicodeFormat() const ->
bool;
970#if defined(OWL5_COMPAT)
974 auto GetColumn(
int index, LVCOLUMN*
column)
const ->
bool;
975 auto GetItemPosition(
int index,
POINT*
pt)
const ->
bool;
977 auto DeleteAnItem(
int index) ->
bool {
return DeleteItem(index); }
985 using TControl::DeleteItem;
Class wrapper for management of color values.
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
Pure virtual base class for comparing sort items.
virtual int Compare(LPARAM item1, LPARAM item2, LPARAM lParam) const =0
Performs a comparison of two items.
Encapsulates the ListView control, a window that displays a collection of items, each item consisting...
auto ResetIconSpacing() -> TSize
Resets the icon spacing to the default spacing.
TViewType
Describes the type of views.
TImageListType
Describes the type of image list for use with the list window control.
TSetItemCountBehavior
Describes the behavior for the control when setting the item count.
TArrangeCode
TArrangeCode is used to describe how to arrange the items in a list window control.
TItemRectType
Describes the type of rectangle boundaries to retrieve.
TParam1 TItemId
Defines the type of a unique identifier for an item.
TNextItemCode
Describes the next item to retrieve from the current item.
Encapsulates structure LVCOLUMN, used to pass or retrieve column attributes in a TListViewCtrl.
TMaskFlag
Flags for setting the initialisation mask.
TFormat
TFormat is used to describe the alignment of a column in a list window.
std::vector< tchar > TBuffer
Character buffer to hold text.
Encapsulates structure LVFINDINFO, used to find an item in a TListViewCtrl.
tstring Text
String used for searching.
Encapsulates structure LVHITTESTINFO, used to contain information about a hit test in a TListViewCtrl...
TLvHitTestInfo()
Constructs with a zero point for the hit test.
auto GetGroup() -> int
Retrieves the group index for the hit item.
auto GetFlags() -> uint
Retrieves the flags for the hit item.
TLvHitTestInfo(const LVHITTESTINFO &info)
Constructs a copy of another class instance.
auto GetSubItem() -> int
Retrieves the subitem index for the hit item.
auto GetIndex() -> int
Retrieves the hit item's index.
TLvHitTestInfo(const TPoint &p)
Constructs with a specified point for the hit test.
auto SetPoint(const TPoint &p) -> void
Sets a point for the hit test.
Encapsulates structure LVITEM, used to describe an item in a TListViewCtrl.
std::vector< tchar > TBuffer
TListState
TListState is used to describe the state of an item.
TMaskFlag
Flags for setting the initialisation mask.
Encapsulates structure LVTILEVIEWINFO, used to pass or retrieve tile view information in a TListViewC...
TTileSize
TTileSize describes the sizing of tiles in a list view control.
auto IsSizeFixed() const -> bool
Checks if tile view size is fixed-height and fixed-width.
auto GetLabelMargin() const -> TRect
Retrieves the specified coordinates of the label margin.
auto IsSizeAutomatic() const -> bool
Checks if tile view size is automatic.
auto IsSizeFixedHeight() const -> bool
Checks if tile view size is fixed-height.
auto GetMaxTextLines() const -> int
Retrieves the specified maximum number of text lines in each item label.
auto IsSizeFixedWidth() const -> bool
Checks if tile view size is fixed-width.
auto GetTileSize() const -> TSize
Retrieves the specified tile size.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
HWND THandle
TWindow encapsulates an HWND.
Definition of classes for CommonControl encapsulation.
Object Windows Library (OWLNext Core)
WPARAM TParam1
First parameter type.
General definitions used by all ObjectWindows programs.