9#if !defined(OWL_TREEVIEWCTRL_H)
10#define OWL_TREEVIEWCTRL_H
13#if defined(BI_HAS_PRAGMA_ONCE)
68 void SetImageIndex(
int index);
72 void SetSelectedImageIndex(
int index);
77 LPARAM GetItemData()
const;
197 uint GetMask(
void)
const;
199 uint GetStateMask(
void)
const;
209 bool GetState(
uint& state,
bool getNew =
true);
210 bool SetImageIndex(
int index,
bool sendNow =
true);
211 bool SetSelectedImageIndex(
int index,
bool sendNow =
true);
215 void Check(
bool state =
true);
240 void FlushCache(
void);
267 bool EnsureVisible();
273 bool SortChildren(
bool recurse =
false);
358 void SetStyle(
uint32 style);
359 bool HasStyle(
uint32 style);
371 void SetIndent(
uint);
380 bool DeleteAllItems();
382 uint GetVisibleCount();
383 HWND GetEditControl();
387 TColor GetBkColor()
const;
390 TColor GetTextColor()
const;
393 TColor GetInsertMarkColor()
const;
394 void SetInsertMarkColor(
const TColor&
clr);
396 int GetItemHeight(
int )
const;
397 int SetItemHeight(
int ,
int height=-1);
399 HWND GetToolTips()
const;
491 return ItemStruct.hItem;
#define PRECONDITION(condition)
Class wrapper for management of color values.
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
HWND EditLabel()
Return the HWND of the edit control to change the text.
TTreeViewCtrl * TreeView
wrapper for item of this tree
TExpandCode
How to expand the item.
HIMAGELIST CreateDragImage()
Return the image list used for a dragging purposes.
TTvItem ItemStruct
contains a TVITEM with HTREEITEM
THowToInsert
Specifies how to insert a new item into a Tree-View control.
bool ExpandItem(uint32 flag)
Expand or contract a parent node.
bool GetItem(void)
Update the item information in the node.
bool SelectItem(uint32 flag)
Make the next item selected.
void SetStateMask(uint mask)
void SetHTreeItem(HTREEITEM hItem)
Set and Get the node's item handle.
TTreeNode GetPrevSibling() const
Return the previous sibling.
TTreeNode AddChild(const TTreeNode &node) const
Inserts a new child item into the Tree-View (TreeView) control.
TTreeViewCtrl & GetTreeView() const
Returns a reference to the associated tree view.
bool SortChildren(bool recurse=false)
Sort the children of this node.
TTreeNode GetChild() const
Get the first child of the current node.
TTreeNode GetNextSibling() const
Return the next sibling.
TTreeNode GetNextVisible() const
Return the next visible item.
TTreeNode GetNextItem(uint32 flag) const
Return the next item.
TNextCode
How to retrieve the next node.
@ Previous
Get the prev sibling.
@ PreviousVisible
Get the prev visible item.
@ Parent
Get the parent of this node.
@ Child
Get the first child.
@ Next
Get the next sibling.
@ NextVisible
Get the next visible item.
void SetCacheSize(uint size)
uint GetStateMask(void) const
HTREEITEM GetHTreeItem() const
bool SetText(const tstring &text, bool sendNow=true)
TTreeNode GetParent() const
Return the parent of the current node.
TTreeNode InsertItem(const TTreeNode &node) const
TTreeNode GetPrevVisible() const
Return the next previous item.
bool EnsureVisible()
Makes sure the item is visible.
Encapsulates the TreeView common control.
HTREEITEM GetNextItem(uint32 nc, HTREEITEM)
Return the next item.
HTREEITEM InsertItem(TV_INSERTSTRUCT *)
Insert an item.
HIMAGELIST GetImageList(TImageListType type)
Return the image list used by the control.
HIMAGELIST CreateDragImage(HTREEITEM item)
Create a drag image.
void SetTextColor(const TColor &clr)
int GetItemHeight(int) const
void SetBkColor(const TColor &clr)
TStyle
Styles for TTreeViewCtrl.
bool Delete(HTREEITEM)
Delete the item.
uint GetIndent()
Return the number of pixels per indent level.
bool DeleteAllItems()
Remove all items from the control.
bool EnsureVisible(HTREEITEM)
Makes sure the item is visible.
void Update()
Compatability for Win32.
TColor GetBkColor() const
void SetInsertMarkColor(const TColor &clr)
HWND EditLabel(HTREEITEM item)
Enable the user to edit the text of an item.
void SetToolTips(HWND tooltip)
HTREEITEM HitTest(TTvHitTestInfo *info)
Return the item that contains the point.
bool SelectItem(uint32 flag, HTREEITEM hItem)
Select the next item.
int SetItemHeight(int, int height=-1)
HWND GetEditControl()
Return the edit control used for editing the text.
HIMAGELIST SetImageList(TImageListType type, HIMAGELIST newList)
Set the image list used by the control.
uint GetVisibleCount()
Return the number of the fully visible items in the control.
TColor GetInsertMarkColor() const
TImageListType
The type of the image list.
void SetIndent(uint)
Set the number of pixels per indent level.
TTreeNode GetRoot()
Return the root node.
uint GetItemCount()
Return the number of items in the control.
bool SetInsertMark(HTREEITEM, bool after=true)
bool SortChildren(PFNTVCOMPARE, HTREEITEM parent, bool recurse=false, LPARAM lParam=0)
bool ExpandItem(uint32 flag, HTREEITEM)
Expand and contract the parent node.
TColor GetTextColor() const
Base class for comparing tree nodes.
virtual int Compare(LPARAM item1, LPARAM item2, LPARAM lParam) const
Returns a value < 0 if item1 < item2, 0 if item1 == item2, or > 0 if item1 > item2.
A TTreeViewCtrl notification for hit-testing.
Used to represent the data to be stored in the TTreeViewCtrl.
void SetHTreeItem(HTREEITEM hItem)
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...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
Definition of classes for CommonControl encapsulation.
Definition of class TControl.
#define DECLARE_RESPONSE_TABLE(cls)
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Object Windows Library (OWLNext Core)
LPARAM TParam2
Second parameter type.
TTvComparator TTwComparator
WPARAM TParam1
First parameter type.
bool IsChecked(HWND ctrl)
Returns true if the given control has BST_CHECKED state.
#define CONST_CAST(targetType, object)