15#if defined(__BORLANDC__)
192 ItemStruct(
tn.ItemStruct),
193 TreeView(
tn.TreeView)
242 tvis.hParent = *
this;
244 tvis.item = (TVITEM&)item;
258 tvis.hParent = parent;
259 tvis.hInsertAfter = *
this;
260 tvis.item = (TVITEM&)item;
269struct TreeCompareThunk {
280 TreeCompareThunk*
ct =
reinterpret_cast<TreeCompareThunk*
>(
lParam);
386 return CacheText != 0;
752 memset(
this, 0,
sizeof(TVITEM));
769 *(TVITEM*)
this = item;
873#if OWL_PERSISTENT_STREAMS
891TTreeViewCtrl::Streamer::Write(opstream&
os)
const
#define WARNX(group, condition, level, message)
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
Use this class to navigate the TTreeViewCtrl.
TTreeNode InsertChild(const TTreeNode &node, THowToInsert how) const
bool SetSelectedImageIndex(int index, bool sendNow=true)
TTreeViewCtrl * TreeView
wrapper for item of this tree
bool GetItemData(LPARAM &data, bool getNew=true)
TTvItem ItemStruct
contains a TVITEM with HTREEITEM
THowToInsert
Specifies how to insert a new item into a Tree-View control.
bool IsChecked() const
Retrieves the node's checked state.
bool SetItemData(LPARAM data, bool sendNow=true)
bool GetItem(void)
Update the item information in the node.
TTreeNode AddSibling(const TTreeNode &node) const
bool GetText(TCHAR *text, uint length, bool getNew=false)
bool SetText(LPCTSTR text, bool sendNow=true)
bool SortChildren(bool recurse=false)
Sort the children of this node.
bool GetHasChildren(int &hasChildren, bool getNew=true)
bool SetHasChildren(int hasChildren, bool sendNow=true)
bool SetImageIndex(int index, bool sendNow=true)
bool GetItemRect(TRect &rect, bool textOnly=true) const
TTreeNode GetNextItem(uint32 flag) const
Return the next item.
@ Caret
Get the item with the caret.
@ FirstVisible
Get the first visible item.
@ DropHilite
Get the item that is the drop target.
void Check(bool state=true)
Sets the node's checked state.
HTREEITEM GetHTreeItem() const
bool GetState(uint &state, bool getNew=true)
TTreeNode & operator=(const TTreeNode &other)
bool SetState(uint state, bool sendNow=true)
TTreeNode GetParent() const
Return the parent of the current node.
TTreeNode InsertItem(const TTreeNode &node) const
Encapsulates the TreeView common control.
HTREEITEM GetNextItem(uint32 nc, HTREEITEM)
Return the next item.
HTREEITEM InsertItem(TV_INSERTSTRUCT *)
Insert an item.
void EvSysKeyDown(uint key, uint repeatCount, uint flags)
bool Delete(HTREEITEM)
Delete the item.
bool HasStyle(uint32 style)
TTreeViewCtrl(TWindow *parent, int id, int x, int y, int w, int h, uint32 style=0, TModule *module=0)
~TTreeViewCtrl() override
TTreeNode GetDropHilite()
auto Transfer(void *buffer, TTransferDirection) -> uint override
void SetStyle(uint32 style)
TTreeNode GetRoot()
Return the root node.
TTreeNode GetFirstVisible()
auto GetWindowClassName() -> TWindowClassName override
void EvKeyDown(uint key, uint repeatCount, uint flags)
bool SortChildren(PFNTVCOMPARE, HTREEITEM parent, bool recurse=false, LPARAM lParam=0)
Base class for comparing tree nodes.
Used to represent the data to be stored in the TTreeViewCtrl.
void SetText(LPCTSTR, int len=-1)
Initialize the text.
void SetItemData(LPARAM)
Store additional information.
void SetHTreeItem(HTREEITEM hItem)
TTvItem()
this is called by some TTreeNode constructors
void GetText(TCHAR *, int len)
LPARAM GetItemData() const
void SetSelectedImageIndex(int index)
Set the selected image index.
void SetImageIndex(int index)
Set the imagelist index.
HTREEITEM GetHTreeitem() const
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...
void EvKeyDown(uint key, uint repeatCount, uint flags)
The default message handler for WM_KEYDOWN.
void EvSysKeyDown(uint key, uint repeatCount, uint flags)
The default message handler for WM_SYSKEYDOWN.
uint32 SetExStyle(uint32 style)
Sets the extra style bits of the window.
uint32 GetExStyle() const
Gets the extra style bits of the window.
uint32 GetStyle() const
Gets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
uint32 SetStyle(uint32 style)
Sets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE1(cls, base1)
void WriteBaseObject(Base *base, opstream &out)
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Object Windows Library (OWLNext Core)
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
int CALLBACK OwlTreeWindCompare(LPARAM itemData1, LPARAM itemData2, LPARAM lParam)
void InUse(const T &arg)
Handy utility to avoid compiler warnings about unused parameters.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
#define CONST_CAST(targetType, object)
#define REINTERPRET_CAST(targetType, object)
Definition of TSystem, a system information provider class.
Declares TTreeViewCtrl, TTreeNode, and TTvItem.