OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Encapsulates structure LVCOLUMN, used to pass or retrieve column attributes in a TListViewCtrl. More...
#include <owl/listviewctrl.h>
Public Types | |
enum | TFormat { Unspecified = 0 , Left = LVCFMT_LEFT , Center = LVCFMT_CENTER , Right = LVCFMT_RIGHT } |
TFormat is used to describe the alignment of a column in a list window. More... | |
enum | TMaskFlag { lvcfAll = 0xFFFFFFFF } |
Flags for setting the initialisation mask. More... | |
Public Member Functions | |
Constructors | |
TLvColumn (uint mask_=lvcfAll, int subitemIndex=0, int bufferSize=1000) | |
Constructs an empty parameter package. | |
TLvColumn (const tstring &text, int width, TFormat how=Left, int subitemIndex=0) | |
Constructs a parameter package based on the given text, width, format, and subitem. | |
TLvColumn (const TListViewCtrl &ctl, int index, uint mask_=lvcfAll, int subitemIndex=0, int bufferSize=1000) | |
Constructs a parameter package based on the column attributes of an existing control. | |
TLvColumn (const LVCOLUMN &column) | |
Constructs a parameter package from an existing parameter package. | |
TLvColumn (const TLvColumn &column) | |
Constructs a parameter package from an existing parameter package. | |
Overload operations | |
auto | operator= (const LVCOLUMN &column) -> TLvColumn & |
Overloads the assignment operator to perform a deep copy using a separate string buffer if applicable. | |
auto | operator= (const TLvColumn &column) -> TLvColumn & |
Copies the given parameter package. | |
Information changing operations | |
auto | SetTextBuffer (TCHAR *buffer, int bufferSize) -> void |
Overrides the internal buffer and assigns an external text buffer. | |
auto | SetText (const tstring &text) -> void |
Copies the given text into the internal text buffer. | |
auto | SetFormat (TFormat how) -> void |
Sets the alignment format for the column. | |
auto | SetWidth (int width, const tstring &text=tstring()) -> void |
Sets the width of the column. | |
auto | SetSubItem (int subitemIndex) -> void |
Sets the subitem index. | |
Information retrieval operations | |
auto | GetText () const -> LPCTSTR |
Retrieves the current text for the column. | |
auto | GetFormat () const -> TFormat |
Retrieves the current alignment format for the column. | |
auto | GetWidth () const -> int |
Retrieves the current width for the column. | |
auto | GetSubItem () const -> int |
Retrieves the current subitem used for the column. | |
New IE 3.0 data | |
auto | GetImage () const -> int |
Retrieves the current image index used for the column. | |
auto | SetImage (int image) -> void |
Sets the image index within the image list to use. | |
auto | GetOrder () const -> int |
Retrieves the current column order offset used for the column. | |
auto | SetOrder (int order) -> void |
Sets the column order offset. | |
Protected Types | |
typedef std::vector< tchar > | TBuffer |
Character buffer to hold text. | |
Protected Member Functions | |
auto | Init () -> void |
Initializes member data; used by internal routines. | |
Protected Attributes | |
TBuffer | Buffer |
Encapsulates structure LVCOLUMN, used to pass or retrieve column attributes in a TListViewCtrl.
Definition at line 300 of file listviewctrl.h.
|
protected |
Character buffer to hold text.
Definition at line 377 of file listviewctrl.h.
TFormat is used to describe the alignment of a column in a list window.
Enumerator | |
---|---|
Unspecified | Unspecified. |
Left | Left aligned. |
Center | Centered. |
Right | Right aligned. |
Definition at line 308 of file listviewctrl.h.
Flags for setting the initialisation mask.
Enumerator | |
---|---|
lvcfAll |
Definition at line 320 of file listviewctrl.h.
|
explicit |
Constructs an empty parameter package.
This constructor is typically used to retrieve information about an existing column. For example,
[in] | mask_ | is the mask to use. |
[in] | subitemIndex | is the subitem index to use. |
[in] | bufferSize | is the size of the text characters to allocate and use, provided the mask includes LVCF_TEXT. |
Definition at line 565 of file listviewctrl.cpp.
References Buffer, CHECK, Init(), SetSubItem(), and SetTextBuffer().
owl::TLvColumn::TLvColumn | ( | const tstring & | text, |
int | width, | ||
TFormat | how = Left, | ||
int | subitemIndex = 0 ) |
Constructs a parameter package based on the given text, width, format, and subitem.
[in] | text | is the string to use. |
[in] | width | is the pixel width to use the column; if 0, a width will be calculated by SetWidth. |
[in] | how | specifies the formatting to use for the string. |
[in] | subitemIndex | is the subitem index to use. |
Definition at line 586 of file listviewctrl.cpp.
References Init(), SetFormat(), SetSubItem(), SetText(), and SetWidth().
owl::TLvColumn::TLvColumn | ( | const TListViewCtrl & | ctl, |
int | index, | ||
uint | mask_ = lvcfAll, | ||
int | subitemIndex = 0, | ||
int | bufferSize = 1000 ) |
Constructs a parameter package based on the column attributes of an existing control.
[in] | ctl | is an existing list-view control from which to copy. |
[in] | index | is the item index of the existing list-view control to use for copying. |
[in] | mask_ | is the mask to use for copying. |
[in] | subitemIndex | is the subitem index to use. |
[in] | bufferSize | is the size of the text characters to allocate and use, provided the mask includes LVCF_TEXT. |
Definition at line 604 of file listviewctrl.cpp.
References Buffer, CHECK, Init(), PRECONDITION, SetSubItem(), and SetTextBuffer().
owl::TLvColumn::TLvColumn | ( | const LVCOLUMN & | column | ) |
Constructs a parameter package from an existing parameter package.
A deep copy is performed; see the assignment operator for const LVCOLUMN&
for details.
[in] | column | is an existing list-view column class from which to copy. |
Definition at line 626 of file listviewctrl.cpp.
owl::TLvColumn::TLvColumn | ( | const TLvColumn & | column | ) |
Constructs a parameter package from an existing parameter package.
A deep copy is performed; see the copy assignment operator for details.
[in] | column | is an existing list-view column class from which to copy. |
Definition at line 638 of file listviewctrl.cpp.
Retrieves the current alignment format for the column.
Definition at line 778 of file listviewctrl.cpp.
References Unspecified.
Retrieves the current image index used for the column.
Definition at line 811 of file listviewctrl.cpp.
Retrieves the current column order offset used for the column.
Definition at line 836 of file listviewctrl.cpp.
Retrieves the current subitem used for the column.
Definition at line 800 of file listviewctrl.cpp.
Retrieves the current text for the column.
Definition at line 767 of file listviewctrl.cpp.
Retrieves the current width for the column.
Definition at line 789 of file listviewctrl.cpp.
Initializes member data; used by internal routines.
Definition at line 861 of file listviewctrl.cpp.
Overloads the assignment operator to perform a deep copy using a separate string buffer if applicable.
[in] | column | is an existing list-view column class from which to copy. |
Definition at line 649 of file listviewctrl.cpp.
Copies the given parameter package.
A deep copy is performed; see the assignment operator for const LVCOLUMN&
for details.
Definition at line 663 of file listviewctrl.cpp.
Sets the alignment format for the column.
[in] | how | specifies the formatting to use for the string. |
Definition at line 719 of file listviewctrl.cpp.
Sets the image index within the image list to use.
[in] | image | is the image index to use. |
Definition at line 824 of file listviewctrl.cpp.
Sets the column order offset.
[in] | order | is the zero-based left-to-right column offset to use. |
Definition at line 849 of file listviewctrl.cpp.
Sets the subitem index.
[in] | subitemIndex | is the subitem index to use. |
Definition at line 755 of file listviewctrl.cpp.
Copies the given text into the internal text buffer.
Sets the pszText and cchTextMax members of LVCOLUMN, and enables the LVCF_TEXT flag.
[in] | text | is the string to copy. |
Definition at line 701 of file listviewctrl.cpp.
References _T.
Overrides the internal buffer and assigns an external text buffer.
Sets the pszText and cchTextMax members of LVCOLUMN, and enables the LVCF_TEXT flag.
[in] | buffer | pointer to a text string buffer to use. |
[in] | bufferSize | specifies the size of the text string buffer. |
Definition at line 681 of file listviewctrl.cpp.
Sets the width of the column.
[in] | width | is the pixel width to use the column; if 0, a width will be calculated by using the default GUI system font for the string. |
[in] | text | is the string to use for calculating a width when width is 0. |
Definition at line 741 of file listviewctrl.cpp.
References owl::TFont::GetTextExtent(), and owl::TDefaultGuiFont::sfiIcon.
|
protected |
Definition at line 378 of file listviewctrl.h.