Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUIComboboxProperties.cpp

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIComboboxProperties.cpp
00003         created:        11/7/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Implementation of Combobox properties classes
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #include "elements/CEGUIComboboxProperties.h"
00027 #include "elements/CEGUICombobox.h"
00028 #include "CEGUIPropertyHelper.h"
00029 
00030 
00031 // Start of CEGUI namespace section
00032 namespace CEGUI
00033 {
00034 
00035 // Start of ComboboxProperties namespace section
00036 namespace ComboboxProperties
00037 {
00038 String  ReadOnly::get(const PropertyReceiver* receiver) const
00039 {
00040         return PropertyHelper::boolToString(static_cast<const Combobox*>(receiver)->isReadOnly());
00041 }
00042 
00043 
00044 void    ReadOnly::set(PropertyReceiver* receiver, const String& value)
00045 {
00046         static_cast<Combobox*>(receiver)->setReadOnly(PropertyHelper::stringToBool(value));
00047 }
00048 
00049 
00050 String  ValidationString::get(const PropertyReceiver* receiver) const
00051 {
00052         return static_cast<const Combobox*>(receiver)->getValidationString();
00053 }
00054 
00055 
00056 void    ValidationString::set(PropertyReceiver* receiver, const String& value)
00057 {
00058         static_cast<Combobox*>(receiver)->setValidationString(value);
00059 }
00060 
00061 
00062 String  CaratIndex::get(const PropertyReceiver* receiver) const
00063 {
00064         return PropertyHelper::uintToString(static_cast<uint>(static_cast<const Combobox*>(receiver)->getCaratIndex()));
00065 }
00066 
00067 
00068 void    CaratIndex::set(PropertyReceiver* receiver, const String& value)
00069 {
00070         static_cast<Combobox*>(receiver)->setCaratIndex(PropertyHelper::stringToUint(value));
00071 }
00072 
00073 
00074 String  EditSelectionStart::get(const PropertyReceiver* receiver) const
00075 {
00076         return PropertyHelper::uintToString(static_cast<uint>(static_cast<const Combobox*>(receiver)->getSelectionStartIndex()));
00077 }
00078 
00079 
00080 void    EditSelectionStart::set(PropertyReceiver* receiver, const String& value)
00081 {
00082         Combobox* eb = static_cast<Combobox*>(receiver);
00083         uint selStart = PropertyHelper::stringToUint(value);
00084         eb->setSelection(selStart, selStart + eb->getSelectionLength());
00085 }
00086 
00087 
00088 String  EditSelectionLength::get(const PropertyReceiver* receiver) const
00089 {
00090         return PropertyHelper::uintToString(static_cast<uint>(static_cast<const Combobox*>(receiver)->getSelectionLength()));
00091 }
00092 
00093 
00094 void    EditSelectionLength::set(PropertyReceiver* receiver, const String& value)
00095 {
00096         Combobox* eb = static_cast<Combobox*>(receiver);
00097         uint selLen = PropertyHelper::stringToUint(value);
00098         eb->setSelection(eb->getSelectionStartIndex(), eb->getSelectionStartIndex() + selLen);
00099 }
00100 
00101 
00102 String  MaxEditTextLength::get(const PropertyReceiver* receiver) const
00103 {
00104         return PropertyHelper::uintToString(static_cast<uint>(static_cast<const Combobox*>(receiver)->getMaxTextLength()));
00105 }
00106 
00107 
00108 void    MaxEditTextLength::set(PropertyReceiver* receiver, const String& value)
00109 {
00110         static_cast<Combobox*>(receiver)->setMaxTextLength(PropertyHelper::stringToUint(value));
00111 }
00112 
00113 
00114 String  NormalEditTextColour::get(const PropertyReceiver* receiver) const
00115 {
00116         return PropertyHelper::colourToString(static_cast<const Combobox*>(receiver)->getNormalTextColour());
00117 }
00118 
00119 
00120 void    NormalEditTextColour::set(PropertyReceiver* receiver, const String& value)
00121 {
00122         static_cast<Combobox*>(receiver)->setNormalTextColour(PropertyHelper::stringToColour(value));
00123 }
00124 
00125 
00126 String  SelectedEditTextColour::get(const PropertyReceiver* receiver) const
00127 {
00128         return PropertyHelper::colourToString(static_cast<const Combobox*>(receiver)->getSelectedTextColour());
00129 }
00130 
00131 
00132 void    SelectedEditTextColour::set(PropertyReceiver* receiver, const String& value)
00133 {
00134         static_cast<Combobox*>(receiver)->setSelectedTextColour(PropertyHelper::stringToColour(value));
00135 }
00136 
00137 
00138 String  ActiveEditSelectionColour::get(const PropertyReceiver* receiver) const
00139 {
00140         return PropertyHelper::colourToString(static_cast<const Combobox*>(receiver)->getNormalSelectBrushColour());
00141 }
00142 
00143 
00144 void    ActiveEditSelectionColour::set(PropertyReceiver* receiver, const String& value)
00145 {
00146         static_cast<Combobox*>(receiver)->setNormalSelectBrushColour(PropertyHelper::stringToColour(value));
00147 }
00148 
00149 
00150 String  InactiveEditSelectionColour::get(const PropertyReceiver* receiver) const
00151 {
00152         return PropertyHelper::colourToString(static_cast<const Combobox*>(receiver)->getInactiveSelectBrushColour());
00153 }
00154 
00155 
00156 void    InactiveEditSelectionColour::set(PropertyReceiver* receiver, const String& value)
00157 {
00158         static_cast<Combobox*>(receiver)->setInactiveSelectBrushColour(PropertyHelper::stringToColour(value));
00159 }
00160 
00161 
00162 String  SortList::get(const PropertyReceiver* receiver) const
00163 {
00164         return PropertyHelper::boolToString(static_cast<const Combobox*>(receiver)->isSortEnabled());
00165 }
00166 
00167 
00168 void    SortList::set(PropertyReceiver* receiver, const String& value)
00169 {
00170         static_cast<Combobox*>(receiver)->setSortingEnabled(PropertyHelper::stringToBool(value));
00171 }
00172 
00173 
00174 String  ForceVertScrollbar::get(const PropertyReceiver* receiver) const
00175 {
00176         return PropertyHelper::boolToString(static_cast<const Combobox*>(receiver)->isVertScrollbarAlwaysShown());
00177 }
00178 
00179 
00180 void    ForceVertScrollbar::set(PropertyReceiver* receiver, const String& value)
00181 {
00182         static_cast<Combobox*>(receiver)->setShowVertScrollbar(PropertyHelper::stringToBool(value));
00183 }
00184 
00185 
00186 String  ForceHorzScrollbar::get(const PropertyReceiver* receiver) const
00187 {
00188         return PropertyHelper::boolToString(static_cast<const Combobox*>(receiver)->isHorzScrollbarAlwaysShown());
00189 }
00190 
00191 
00192 void    ForceHorzScrollbar::set(PropertyReceiver* receiver, const String& value)
00193 {
00194         static_cast<Combobox*>(receiver)->setShowHorzScrollbar(PropertyHelper::stringToBool(value));
00195 }
00196 
00197 
00198 String  SingleClickMode::get(const PropertyReceiver* receiver) const
00199 {
00200         return PropertyHelper::boolToString(static_cast<const Combobox*>(receiver)->getSingleClickEnabled());
00201 }
00202 
00203 
00204 void    SingleClickMode::set(PropertyReceiver* receiver, const String& value)
00205 {
00206         static_cast<Combobox*>(receiver)->setSingleClickEnabled(PropertyHelper::stringToBool(value));
00207 }
00208 
00209 
00210 } // End of  ComboboxProperties namespace section
00211 
00212 } // End of  CEGUI namespace section

Generated on Wed Sep 7 09:56:30 2005 for Crazy Eddies GUI System by  doxygen 1.4.3