26 #define YUILogComponent "ui"
29 #include "YUISymbols.h"
30 #include "YSelectionWidget.h"
32 #include "YTreeItem.h"
37 : immediateMode(
false )
44 YTree::YTree(
YWidget * parent,
const std::string & label,
bool multiSelection,
bool recursiveSelection )
50 YUI_CHECK_NEW( priv );
66 return priv->immediateMode;
105 propSet.
add(
YProperty( YUIProperty_Value, YOtherProperty ) );
106 propSet.
add(
YProperty( YUIProperty_CurrentItem, YOtherProperty ) );
107 propSet.
add(
YProperty( YUIProperty_CurrentBranch, YOtherProperty ) );
108 propSet.
add(
YProperty( YUIProperty_Items, YOtherProperty ) );
109 propSet.
add(
YProperty( YUIProperty_OpenItems, YOtherProperty ) );
110 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
111 propSet.
add(
YProperty( YUIProperty_IconPath, YStringProperty ) );
112 propSet.
add(
YProperty( YUIProperty_SelectedItems, YOtherProperty ) );
113 propSet.
add(
YProperty( YUIProperty_MultiSelection, YBoolProperty,
true ) );
127 if ( propertyName == YUIProperty_Value )
return false;
128 else if ( propertyName == YUIProperty_CurrentItem )
return false;
129 else if ( propertyName == YUIProperty_CurrentBranch )
return false;
130 else if ( propertyName == YUIProperty_Items )
return false;
131 else if ( propertyName == YUIProperty_OpenItems )
return false;
132 else if ( propertyName == YUIProperty_SelectedItems )
return false;
150 if ( propertyName == YUIProperty_Value )
return YPropertyValue( YOtherProperty );
151 else if ( propertyName == YUIProperty_CurrentItem )
return YPropertyValue( YOtherProperty );
152 else if ( propertyName == YUIProperty_CurrentBranch )
return YPropertyValue( YOtherProperty );
153 else if ( propertyName == YUIProperty_Items )
return YPropertyValue( YOtherProperty );
154 else if ( propertyName == YUIProperty_OpenItems )
return YPropertyValue( YOtherProperty );
157 else if ( propertyName == YUIProperty_SelectedItems )
return YPropertyValue( YOtherProperty );
bool immediateMode() const
void check(const std::string &propertyName) const
void setImmediateMode(bool on=true)
void add(const YProperty &prop)
virtual YPropertyValue getProperty(const std::string &propertyName)
std::string stringVal() const
YTree(YWidget *parent, const std::string &label, bool multiSelection, bool recursiveSelection)
bool hasMultiSelection() const
virtual void addItems(const YItemCollection &itemCollection)
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
virtual void rebuildTree()=0
virtual const YPropertySet & propertySet()
YPropertyType type() const