Interface IPropertyTreeView
- Namespace
- CADability.UserInterface
- Assembly
- CADability.dll
The interface a property display control provides to the entries (IShowProperty) it shows. CADability implements it in its properties explorer; an application can replace that control by its own, which only has to implement this interface.
public interface IPropertyTreeView
Properties
ActiveView
The active view, or null when there is none.
IView ActiveView { get; set; }
Property Value
AllIds
The help links (HelpLink) of all entries the display currently contains.
string[] AllIds { get; }
Property Value
- string[]
DefaultLineHeight
The standard height of a line of the display, in pixels.
int DefaultLineHeight { get; }
Property Value
Methods
AddShowProperty(IShowProperty, bool)
Adds the entry to the display, as a root entry.
void AddShowProperty(IShowProperty ToAdd, bool TopMost)
Parameters
ToAddIShowPropertythe entry to show
TopMostbooltrue: as the first entry, false: as the last entry
ChildFocusChanged(IShowProperty, bool)
Notification from an entry that a control it owns received or lost the keyboard focus, so that the display can update its selection and raise FocusChangedEvent.
void ChildFocusChanged(IShowProperty child, bool gotFocus)
Parameters
childIShowPropertythe entry whose control changed its focus
gotFocusbooltrue: the control received the focus, false: it lost the focus
Dispose()
Releases the display; every displayed entry gets Removed(IPropertyTreeView) first.
void Dispose()
FindFromHelpLink(string)
Finds the IShowProperty object with the given help link (HelpLink). The help link is used as a kind of unique id. It is usually the the resource id for the label text. If the desired entry is not visible it will not be found. You will first have to open the sub entries of the parent entry (OpenSubEntries(IShowProperty, bool)).
IShowProperty FindFromHelpLink(string HelpLink)
Parameters
HelpLinkstringThe help link for the desired entry
Returns
- IShowProperty
The IShowProperty entry
FocusEntered(IShowProperty, IShowProperty, IShowProperty)
Checks, whether a Focus change from oldFocus to newFocus implies a focus change to "toTest" or one of its child entries from some entry outside of "toTest". If newFocus is not toTest or one of its children "false" is returned. If the focus changes from one child of toTest to another or from a child of toTest to toTest itself or from toTest to one of its children, false is returned.
bool FocusEntered(IShowProperty toTest, IShowProperty oldFocus, IShowProperty newFocus)
Parameters
toTestIShowPropertythe entry beeing examined
oldFocusIShowPropertythe entry that lost the focus
newFocusIShowPropertythe entry that got the focus
Returns
- bool
true if toTest lost the focus
FocusLeft(IShowProperty, IShowProperty, IShowProperty)
Checks, whether a Focus change from oldFocus to newFocus implies a focus change from "toTest" or one of its child entries to some entry outside of "toTest". If oldFocus is not toTest or one of its children "false" is returned. If the focus changes from one child of toTest to another or from a child of toTest to toTest itself or from toTest to one of its children, false is returned.
bool FocusLeft(IShowProperty toTest, IShowProperty oldFocus, IShowProperty newFocus)
Parameters
toTestIShowPropertythe entry beeing examined
oldFocusIShowPropertythe entry that lost the focus
newFocusIShowPropertythe entry that got the focus
Returns
- bool
true if toTest lost the focus
GetBoundsForControl(Rectangle)
Converts a rectangle given relative to the line of an entry into the client coordinates of the display, for entries that place their own control (e.g. an edit box) over their line.
Rectangle GetBoundsForControl(Rectangle position)
Parameters
positionRectanglethe rectangle relative to the entry's line, in pixels
Returns
- Rectangle
the rectangle in the client coordinates of the display
GetCurrentSelection()
Returns the selected entry of the display.
IShowProperty GetCurrentSelection()
Returns
- IShowProperty
the selected entry, or null when no entry is selected
GetFrame()
Returns the IFrame object of the context of this IPropertyTreeView
IFrame GetFrame()
Returns
GetParent(IShowProperty)
Returns the entry that contains child among its sub entries.
IShowProperty GetParent(IShowProperty child)
Parameters
childIShowPropertythe entry whose parent is wanted
Returns
- IShowProperty
the parent entry, or null for a root entry
GetPointForControl(Point)
Converts a point given relative to the line of an entry into the client coordinates of the display, the counterpart of GetBoundsForControl(Rectangle) for a single point.
Point GetPointForControl(Point loc)
Parameters
locPointthe point relative to the entry's line, in pixels
Returns
- Point
the point in the client coordinates of the display
HasTopLevelShowProperty(IShowProperty)
Determins whether the given IShowProperty LookForThis is one of the root ShowProperties.
bool HasTopLevelShowProperty(IShowProperty LookForThis)
Parameters
LookForThisIShowPropertylook for this IShowProperty object
Returns
- bool
true, if LookForThis is a root ShowProperty, false otherwise
IsOnTop()
Determins whether this IPropertyTreeView is on top of all IPropertyTreeView objects. Several IPropertyTreeViews reside in the ControlCenter in different tab pages. Determins whether this IPropertyTreeView is in the selected tab page.
bool IsOnTop()
Returns
- bool
true if on top, false otherwise
IsOpen(IShowProperty)
Tells whether the sub entries of the entry are currently shown.
bool IsOpen(IShowProperty toTest)
Parameters
toTestIShowPropertythe entry to test
Returns
- bool
true when the entry is open, false when it is closed or not displayed
MakeVisible(IShowProperty)
Scrolls the display so that the entry is visible, opening its parents if necessary.
void MakeVisible(IShowProperty ToShow)
Parameters
ToShowIShowPropertythe entry to show
OpenSubEntries(IShowProperty, bool)
The sub entries of the object given in the parameter shall be (created and) visible.
void OpenSubEntries(IShowProperty ToOpen, bool open)
Parameters
ToOpenIShowPropertyThe object whose sub entries are to be opened or closed
openbooltrue to open (show) the sub entries, false to close them
PopupContextMenu(IShowProperty)
Shows the context menu of the entry, as if the user had clicked its context menu button.
void PopupContextMenu(IShowProperty entry)
Parameters
entryIShowPropertythe entry whose context menu is shown
Refresh(IShowProperty)
Redisplays the entry, e.g. after its value or its list of sub entries has changed.
void Refresh(IShowProperty ToRefresh)
Parameters
ToRefreshIShowPropertythe entry to redisplay
RemoveShowProperty(IShowProperty)
Removes the entry from the display.
void RemoveShowProperty(IShowProperty ToRemove)
Parameters
ToRemoveIShowPropertythe entry to remove
ReplaceShowProperty(IShowProperty, IShowProperty)
Replaces an entry of the display by another one, at the same position.
void ReplaceShowProperty(IShowProperty ToReplace, IShowProperty ToInsert)
Parameters
ToReplaceIShowPropertythe entry to replace
ToInsertIShowPropertythe new entry
SelectEntry(IShowProperty)
Selects (highlights) the entry.
void SelectEntry(IShowProperty NewSelection)
Parameters
NewSelectionIShowPropertythe entry to select
SelectNext(IShowProperty, bool)
Moves the focus from the object given in the parameter to the next or previous object in the tab order.
void SelectNext(IShowProperty CurrentProperty, bool Forward)
Parameters
CurrentPropertyIShowPropertyThe currently focused object
Forwardbooltrue sets the focus on the next object in the tab order, false on the previous one
SetFont(Font)
Sets the font in which the display draws its entries.
void SetFont(Font font)
Parameters
fontFontthe new font
StartEditLabel(IShowProperty)
Starts editing the label text of the entry.
void StartEditLabel(IShowProperty ToEdit)
Parameters
ToEditIShowPropertythe entry whose label is edited
Events
FocusChangedEvent
Raised when the keyboard focus moves from one entry of the display to another, or enters or leaves the display (see FocusChangedDelegate).
event FocusChangedDelegate FocusChangedEvent