Public Member Functions | |
| CTreeListPane (void) | |
| ~CTreeListPane (void) | |
| virtual void | WindowIsClosing () |
| void | UpdateContent () |
| bool | Create (LPCTSTR PaneTitle, CWnd *parentWnd, int id) |
| void | EnableHeader (bool enable=true) |
| void | SetDrawTreeLine (bool treeline) |
| void | AddItem (TLITEM item) |
| void | AddSubItem (TLITEM parent, TLITEM subItem) |
| TLITEM | CreateGroup (LPCTSTR name, const CVariant &value=NULL, DWORD_PTR data=NULL, bool Editable=false) |
| void | SetValueBgColor (TLITEM item, COLORREF color) |
| void | SetValueHiliteColor (TLITEM item, COLORREF color, bool redraw=false) |
| void | ResetValueBgColor (TLITEM item) |
| void | SetValueFontItalic (TLITEM item, bool italic) |
| void | SetValueFontBold (TLITEM item, bool bold) |
| void | SetValueFontColor (TLITEM item, COLORREF color) |
| void | SetNameBgColor (TLITEM item, COLORREF color) |
| void | SetNameFontColor (TLITEM item, COLORREF color) |
| void | ResetNameBgColor (TLITEM item) |
| void | SetNameFontItalic (TLITEM item, bool italic) |
| void | SetNameFontBold (TLITEM item, bool bold) |
| void | Subscribe (CSubscriber *pSubscr) |
| void | UnSubscribe (CSubscriber *pSubscr) |
| void | EnableItem (TLITEM item, bool enable) |
| void | SetItemStatic (TLITEM item, bool stat) |
| void | SetImageList (UINT ResourceId) |
| void | SetItemImage (TLITEM ItemId, int ImageIndex) |
| DWORD_PTR | GetItemData (TLITEM item) |
| void | SetItemData (TLITEM item, DWORD_PTR data) |
| void | SetName (TLITEM item, LPCTSTR name) |
| const CVariant & | GetValue (TLITEM item) |
| void | SetValue (TLITEM item, const CVariant &varValue) |
| TLITEM | GetHeaderItem (TLITEM table, UINT colInd) |
| void | SetFullGroupName (TLITEM item, bool fullName=true) |
| TLITEM | CreateEditField (LPCTSTR name, const CVariant &value, LPCTSTR descr=NULL, DWORD_PTR data=NULL, LPCTSTR editMask=NULL, LPCTSTR validChars=NULL) |
| TLITEM | CreateCheckBox (LPCTSTR name, bool checked, LPCTSTR descr=NULL, DWORD_PTR data=NULL) |
| TLITEM | CreateButton (LPCTSTR name, bool pressed, LPCTSTR descr=NULL, DWORD_PTR data=NULL) |
| TLITEM | CreateStaticText (LPCTSTR name, LPCTSTR value=NULL, LPCTSTR descr=NULL, DWORD_PTR data=NULL) |
| TLITEM | CreateSpin (LPCTSTR name, long selectedVal, long min, long max, LPCTSTR descr=NULL, DWORD_PTR data=NULL, int AccelBaseStep=5) |
| void | SetAccelBaseStep (TLITEM item, int AccelBaseStep) |
| TLITEM | CreateCB (LPCTSTR name, LPCTSTR selectedVal=NULL, LPCTSTR descr=NULL, DWORD_PTR data=NULL) |
| BOOL | AddOptionCB (TLITEM cb, LPCTSTR lpszOption, BOOL bInsertUnique=TRUE) |
| void | RemoveAllOptionsCB (TLITEM cb) |
| int | GetOptionCountCB (TLITEM cb) |
| LPCTSTR | GetOptionCB (TLITEM cb, int nIndex) |
| int | GetCurSelIndexCB (TLITEM cb) |
| void | SetCurSelIndexCB (TLITEM cb, int sel) |
| DWORD_PTR | GetOptionData (TLITEM item, int index) |
| void | SetOptionData (TLITEM item, int index, DWORD_PTR data) |
| void | AppendRow (TLITEM table, UINT RowCount, bool redraw=false) |
| TLITEM | CreateTable (LPCTSTR name, UINT RowCount, UINT ColCount, DWORD_PTR Data=NULL) |
| void | SetHeaderTitle (TLITEM table, UINT colInd, LPCTSTR title) |
| bool | SetItemAt (TLITEM table, TLITEM item, UINT rowInd, UINT colInd) |
| void | SetColumnWid (TLITEM table, UINT colInd, UINT wid) |
| void | ShowToolbar (bool visible=true) |
| void | RemoveItem (TLITEM item) |
| void | RemoveRow (TLITEM table, UINT rowInd) |
| void | RemoveAll () |
| void | AdjustLayout (bool redraw=1) |
| void | ShowDescription (bool visible=true) |
| void | SetFilter (bool enabled=true) |
| void | SetOwnerDrawWnd (CWnd *pWnd) |
| virtual void | OnHideWindow () |
| void | SetPlainTable () |
| void | SetImageFile (const char *pFile) |
| void | SetUserButtons (CButtonInfo Buttons[], int count) |
| const CMFCToolBar * | GetToolBar () |
| CUserToolBar * | GetUserToolBar () |
| virtual BOOL | CreateClient (CDockablePane *pane, CSubscriber *pSubscr=NULL, CWnd *pOwnerDraw=NULL) |
| virtual void | DeleteClient (CSubscriber *pSubscr) |
| void | SetAssociatedPane (CDockablePane *pane) |
| virtual BOOL | CreateClient (CDockablePane *pane, int NumOfCols, int NumOfVirtualRows, CSubscriber *pSubscr=NULL) |
| void | SetRequestedVirtualPage (const CTableEntry **vec) |
| void | SetTotalVirtualRows (int Lines) |
| void | SelectVirtualRow (int row) |
| void | SetVirtualPage (UINT StartRow) |
| CVariant * | GetScrollInfo () |
| TLITEM | GetVirtualTable () |
| void | EnableDescriptionArea (bool f=true) |
| void | Get32BitVals (const CVariant *p64BitVal, UINT &Lower32BitVal, UINT &Higher32BitVal) |
| void | MakeColumnVisible (int index) |
| TLITEM | CreateProgressBar (LPCTSTR name, int min, int max, LPCTSTR descr=NULL, DWORD_PTR data=NULL) |
Protected Attributes | |
| TLINFO | m_TLInfo |
| CTreeListPane::CTreeListPane | ( | void | ) |
Call the member Create() to make the instance valid.
| CTreeListPane::~CTreeListPane | ( | void | ) |
Destructor
| void CTreeListPane::AddItem | ( | TLITEM | item | ) |
Add a tree list item to the tree list control, i.e. to the first hierarchie level of the tree. The item must be created by calling an appropriate function like CreateGroup(), CreateCheckBox(), etc.
| item | item which is added to the tree list control |
| BOOL CTreeListPane::AddOptionCB | ( | TLITEM | cb, | |
| LPCTSTR | lpszOption, | |||
| BOOL | bInsertUnique = TRUE | |||
| ) |
Add an option to a combo box.
| cb | combo box to which the option is added | |
| lpszOption | option to be added true if check on existing ones should be performed |
| void CTreeListPane::AddSubItem | ( | TLITEM | parent, | |
| TLITEM | subItem | |||
| ) |
Add an item to another item.
| parent | parent of the subItem | |
| subItem | child of parent |
| void CTreeListPane::AdjustLayout | ( | bool | redraw = 1 |
) |
Adjust layout of the TreeList control.
| void CTreeListPane::AppendRow | ( | TLITEM | table, | |
| UINT | RowCount, | |||
| bool | redraw = false | |||
| ) |
Append one or several rows at the end of a table. The new rows are initially empty and can be filled by using SetItemAt().
| table | table to which the new row is appended | |
| RowCount | number of rows to be appended | |
| redraw | true if window should be redrawn |
| bool CTreeListPane::Create | ( | LPCTSTR | PaneTitle, | |
| CWnd * | parentWnd, | |||
| int | id | |||
| ) |
Call this function to construct a pane containing a TreeList control.
| PaneTitle | caption of the pane | |
| parentWnd | parent of the pane which the pane can dock to | |
| id | id of the pane to be created |
| TLITEM CTreeListPane::CreateButton | ( | LPCTSTR | name, | |
| bool | pressed, | |||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL | |||
| ) |
Create a button item which can be attached to the tree list control by calling AddItem or AddSubItem.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| pressed | true if the button should have the pressed state. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| TLITEM CTreeListPane::CreateCB | ( | LPCTSTR | name, | |
| LPCTSTR | selectedVal = NULL, |
|||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL | |||
| ) |
Create a combo box item. Call AddItem or AddSubItem to attach it to the tree list control.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| selectedVal | current selection of the combo box. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| TLITEM CTreeListPane::CreateCheckBox | ( | LPCTSTR | name, | |
| bool | checked, | |||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL | |||
| ) |
Create a check box item. Call AddItem or AddSubItem to attach it to the tree list control.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| checked | true if the check box should have the checked state. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| virtual BOOL CTreeListPane::CreateClient | ( | CDockablePane * | pane, | |
| CSubscriber * | pSubscr = NULL, |
|||
| CWnd * | pOwnerDraw = NULL | |||
| ) | [virtual] |
Initialise a CTreeListPane object.
| pane | Pointer to a CTreeListPane object given by uVision when a callback of the DLL is called by uVision to create a view. | |
| pSubScr | Pointer a CSubscriber object which will be registered for receiving messages from the control (pane). | |
| pOwnerDraw | Pointer to a CWnd object which is drawn by the DLL instead of a CTreeList object. |
| virtual BOOL CTreeListPane::CreateClient | ( | CDockablePane * | pane, | |
| int | NumOfCols, | |||
| int | NumOfVirtualRows, | |||
| CSubscriber * | pSubscr = NULL | |||
| ) | [virtual] |
Use this function to initialise a virtual table.
| pane | Pointer to a CTreeListPane object given by uVision when a callback of the DLL is called by uVision to create a view. | |
| NumOfCols | Number of table columns | |
| NumOfVirtualRows | Number of virtual rows managed by the control which can be up to 2 billions. | |
| pSubScr | Pointer a CSubscriber object which will be registered for receiving messages from the control (pane). |
| TLITEM CTreeListPane::CreateEditField | ( | LPCTSTR | name, | |
| const CVariant & | value, | |||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL, |
|||
| LPCTSTR | editMask = NULL, |
|||
| LPCTSTR | validChars = NULL | |||
| ) |
Create an edit field item. Call AddItem or AddSubItem to attach it to the tree list control.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| value | value of the item. If value is NULL, an empty string is assigned to the item. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| TLITEM CTreeListPane::CreateGroup | ( | LPCTSTR | name, | |
| const CVariant & | value = NULL, |
|||
| DWORD_PTR | data = NULL, |
|||
| bool | Editable = false | |||
| ) |
Create a group item and return the group item data. If a group item doesn't own any child, it is still presented by a expand box in the tree. In this case the message EXPAND_GROUP is sent to the client if the expand box is clicked.
| name | name of the group. | |
| data | specific data mapped to this group item. | |
| Editable | set true if the value of this group should be editable. |
| TLITEM CTreeListPane::CreateSpin | ( | LPCTSTR | name, | |
| long | selectedVal, | |||
| long | min, | |||
| long | max, | |||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL, |
|||
| int | AccelBaseStep = 5 | |||
| ) |
Create a spin control item. Call AddItem or AddSubItem to attach it to the tree list control.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| selectedVal | value of the item. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| TLITEM CTreeListPane::CreateStaticText | ( | LPCTSTR | name, | |
| LPCTSTR | value = NULL, |
|||
| LPCTSTR | descr = NULL, |
|||
| DWORD_PTR | data = NULL | |||
| ) |
Create a static text item. Call AddItem or AddSubItem to attach it to the tree list control.
| name | name of the property shown on the left side of the tree list control. Name is ignored if the item is attached to a table cell. | |
| value | value of the item. If value is NULL, an empty string is assigned to the item. | |
| descr | description text shown in the description area when the item is selected. | |
| data | a item specific data mapped to this item. |
| TLITEM CTreeListPane::CreateTable | ( | LPCTSTR | name, | |
| UINT | RowCount, | |||
| UINT | ColCount, | |||
| DWORD_PTR | Data = NULL | |||
| ) |
Create a table. The table is initialised with a table header and a given count of empty rows. Table header can be filled using the function SetHeaderTitle(...). Table cell can be filled using SetItemAt(...). A table can be extended by appending more rows at it's end.
| name | name of the table shown at the lefthand side | |
| RowCount | number of rows of the table (without the header row) | |
| ColCount | number of columns of the table | |
| Data | specific data mapped to this table. Specific data can be changed by using SetData(TlItem, Data) and can be accessed by using GetData(TlItem) The function returns a TLITEM identifying the table. |
| virtual void CTreeListPane::DeleteClient | ( | CSubscriber * | pSubscr | ) | [virtual] |
Remove a CTreeListPane object.
| pSubscr | Pointer to a CSubscriber object which has been registered for receiving messages from the control. |
| void CTreeListPane::EnableDescriptionArea | ( | bool | f = true |
) |
Turn on / off the description area located at the end of the control.
| void CTreeListPane::EnableHeader | ( | bool | enable = true |
) |
Enable Header Control.
| void CTreeListPane::EnableItem | ( | TLITEM | item, | |
| bool | enable | |||
| ) |
Set item to enabled or disabled depending on the flag. If an item is disabled it's label and value will be grayed out and it's value cannot be edited.
| void CTreeListPane::Get32BitVals | ( | const CVariant * | p64BitVal, | |
| UINT & | Lower32BitVal, | |||
| UINT & | Higher32BitVal | |||
| ) |
Extract firt line number and size of the current page form the given scroll bar position object.
| p64BitVal | Pointer to a CVariant object containing first line number and size of the current page | |
| Lower32BitVal | First line number of the current page | |
| Higher32BitVal | Size of the current page |
| int CTreeListPane::GetCurSelIndexCB | ( | TLITEM | cb | ) |
Return the index (zero based) of the currently selected option of a combo box.
| TLITEM CTreeListPane::GetHeaderItem | ( | TLITEM | table, | |
| UINT | colInd | |||
| ) |
Return the TLITEM of the header given by the zero based column index colInd.
| DWORD_PTR CTreeListPane::GetItemData | ( | TLITEM | item | ) |
Return the data mapped to the tree list item
| LPCTSTR CTreeListPane::GetOptionCB | ( | TLITEM | cb, | |
| int | nIndex | |||
| ) |
Return a pointer to the option given by nIndex. Note that nIndex is zero based.
| int CTreeListPane::GetOptionCountCB | ( | TLITEM | cb | ) |
Return the number of options currently contained in the combo box
| DWORD_PTR CTreeListPane::GetOptionData | ( | TLITEM | item, | |
| int | index | |||
| ) |
Return the application specific data mapped to the combo box option identified by the index.
| CVariant* CTreeListPane::GetScrollInfo | ( | ) |
Return scoll bar position of a virtual table. Call Get32BitVals() to extract current first line number and size of the page.
| const CMFCToolBar* CTreeListPane::GetToolBar | ( | ) |
Return a pointer of the toolbar. Use this pointer for read access to a CMFCToolBar object
| CUserToolBar* CTreeListPane::GetUserToolBar | ( | ) |
Return a pointer of the toolbar. Use this pointer to get and set button attributes
| const CVariant& CTreeListPane::GetValue | ( | TLITEM | item | ) |
Return the value of the item.
| TLITEM CTreeListPane::GetVirtualTable | ( | ) |
Return a pointer to the virtual table.
| void CTreeListPane::RemoveAll | ( | ) |
Remove all items of the TreeList control.
| void CTreeListPane::RemoveAllOptionsCB | ( | TLITEM | cb | ) |
Remove all options of a combo box
| cb | combo box |
| void CTreeListPane::RemoveItem | ( | TLITEM | item | ) |
Remove an item and all it's children. The item can be a table or any other item beside of table row or table cell. To remove a row of a table use DeleteRow().
| void CTreeListPane::RemoveRow | ( | TLITEM | table, | |
| UINT | rowInd | |||
| ) |
Remove row of a table.
| void CTreeListPane::ResetNameBgColor | ( | TLITEM | item | ) |
Set the background color of the name to the initial color
| void CTreeListPane::ResetValueBgColor | ( | TLITEM | item | ) |
Set the background color of the item to the initial color
| void CTreeListPane::SelectVirtualRow | ( | int | row | ) |
Select a certain row of a virtual table.
| row | Row to be selected and highlighted. A value of -1 will deselect a row currently selected. |
| void CTreeListPane::SetAccelBaseStep | ( | TLITEM | item, | |
| int | AccelBaseStep | |||
| ) |
Set acceleration step for spin control. The spin control acceleration is organised by five different speeds depending on how long the left button is hold on the spin control. The scheme for speed changing is as followed:
duration/s increment\n
0 1
2 AccelBaseStep
3 AccelBaseStep * 2
5 AccelBaseStep * 4
6 AccelBaseStep * 6
| void CTreeListPane::SetColumnWid | ( | TLITEM | table, | |
| UINT | colInd, | |||
| UINT | wid | |||
| ) |
Set column with of a table.
| void CTreeListPane::SetCurSelIndexCB | ( | TLITEM | cb, | |
| int | sel | |||
| ) |
Set the index (zero based) of a combo box.
| void CTreeListPane::SetDrawTreeLine | ( | bool | treeline | ) |
Set mode to drawing hierarchy lines.
| void CTreeListPane::SetFilter | ( | bool | enabled = true |
) |
Show filter combo box.
| void CTreeListPane::SetFullGroupName | ( | TLITEM | item, | |
| bool | fullName = true | |||
| ) |
If set to true, group name will not be limited by devider line.
| void CTreeListPane::SetHeaderTitle | ( | TLITEM | table, | |
| UINT | colInd, | |||
| LPCTSTR | title | |||
| ) |
Set title of a header column.
| table | table which the function operates in | |
| colInd | zero based column index of the column to be processed | |
| title | title to be set. |
| void CTreeListPane::SetImageList | ( | UINT | ResourceId | ) |
Set an image list.
| ResourceId | resource id of the image list which contains one or several images. |
| bool CTreeListPane::SetItemAt | ( | TLITEM | table, | |
| TLITEM | item, | |||
| UINT | rowInd, | |||
| UINT | colInd | |||
| ) |
Assign a control to a table cell. A cell is identified by zero based row and zero based column index.
| table | table which the function operates in | |
| item | control item assigned to the table cell | |
| rowInd | zero based row index of the cell | |
| colInd | zero based column index of the cell |
| void CTreeListPane::SetItemData | ( | TLITEM | item, | |
| DWORD_PTR | data | |||
| ) |
Attach data to the tree list item
| void CTreeListPane::SetItemImage | ( | TLITEM | ItemId, | |
| int | ImageIndex | |||
| ) |
Attach an image index to a tree list item. The index is zero based.
| void CTreeListPane::SetItemStatic | ( | TLITEM | item, | |
| bool | stat | |||
| ) |
Set item to not editable. Like EnableItem() item which is set to static cannot be edited but is not grayed out.
| void CTreeListPane::SetName | ( | TLITEM | item, | |
| LPCTSTR | name | |||
| ) |
Set name of the item.
| void CTreeListPane::SetNameBgColor | ( | TLITEM | item, | |
| COLORREF | color | |||
| ) |
Set background color for a name
| void CTreeListPane::SetNameFontBold | ( | TLITEM | item, | |
| bool | bold | |||
| ) |
Set bold font for a name
| bold | true if bold font should be used, otherwise false. |
| void CTreeListPane::SetNameFontColor | ( | TLITEM | item, | |
| COLORREF | color | |||
| ) |
Set font color for a name
| void CTreeListPane::SetNameFontItalic | ( | TLITEM | item, | |
| bool | italic | |||
| ) |
Set italic font for a name
| italic | true if italic font should be used, otherwise false. |
| void CTreeListPane::SetOptionData | ( | TLITEM | item, | |
| int | index, | |||
| DWORD_PTR | data | |||
| ) |
Map an application specific data to the combo box option identified by the index.
| void CTreeListPane::SetOwnerDrawWnd | ( | CWnd * | pWnd | ) |
Call this function to map an owner drawn CWnd object to the current pane. TreeListCtrl will be disabled.
| void CTreeListPane::SetPlainTable | ( | ) |
Set TreeListCtrl as plain table control.
| void CTreeListPane::SetRequestedVirtualPage | ( | const CTableEntry ** | vec | ) |
set and display a view page of a virtual table.
| vec | a two dimensional array [row][column] which has been casted by (const CTableEntry **) describing the current page. Each dimension must end with a NULL pointer. |
| void CTreeListPane::SetTotalVirtualRows | ( | int | Lines | ) |
Set number of rows of a virtual table.
| Lines | Number of rows to be set which can be up to 2 bilions. |
| void CTreeListPane::SetUserButtons | ( | CButtonInfo | Buttons[], | |
| int | count | |||
| ) |
Add user buttons to the toolbar.
| void CTreeListPane::SetValue | ( | TLITEM | item, | |
| const CVariant & | varValue | |||
| ) |
Assign a value to the item.
| void CTreeListPane::SetValueBgColor | ( | TLITEM | item, | |
| COLORREF | color | |||
| ) |
Set background color for an item
| void CTreeListPane::SetValueFontBold | ( | TLITEM | item, | |
| bool | bold | |||
| ) |
Set bold font for the value of an item
| bold | true if bold font should be used, otherwise false. |
| void CTreeListPane::SetValueFontColor | ( | TLITEM | item, | |
| COLORREF | color | |||
| ) |
Set font color for the value of an item.
| void CTreeListPane::SetValueFontItalic | ( | TLITEM | item, | |
| bool | italic | |||
| ) |
Set italic font for the value of an item
| italic | true if italic font should be used, otherwise false. |
| void CTreeListPane::SetValueHiliteColor | ( | TLITEM | item, | |
| COLORREF | color, | |||
| bool | redraw = false | |||
| ) |
Set hilite background color for modified value. If value has been modified, the value field will be filled out with this color.
| void CTreeListPane::SetVirtualPage | ( | UINT | StartRow | ) |
Set up a page of a virtual table.
| StartRow | first row number of the page which should be shown, if the page size is 20 and StartRow is 100, the page containing row 100 til 119 will be displayed. |
| void CTreeListPane::ShowDescription | ( | bool | visible = true |
) |
Show / hide description area depending on the given parameter.
| void CTreeListPane::ShowToolbar | ( | bool | visible = true |
) |
Create a toolbar and attach it to the treelist pane. The toolbar contains an editable combobox for filter string.
| void CTreeListPane::Subscribe | ( | CSubscriber * | pSubscr | ) |
Client call this function to subscribe an instance derived from CSubscriber at tree list control for messages.
| pSubscr | pointer to the instance which should be registered at the tree list control. |
| void CTreeListPane::UnSubscribe | ( | CSubscriber * | pSubscr | ) |
Client call this function to unsubscribe an instance derived from CSubscriber at tree list control for messages.
| pSubscr | pointer to the instance which should be removed in the subscriber list. |
| void CTreeListPane::UpdateContent | ( | ) |
Update the client area of the control
1.7.1