Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8559 in orxonox.OLD for branches/gui/src/lib


Ignore:
Timestamp:
Jun 17, 2006, 12:07:51 PM (18 years ago)
Author:
bensch
Message:

gui: doxytags

Location:
branches/gui/src/lib/gui/gl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_style.cc

    r8555 r8559  
    2626  /**
    2727   * @brief standard constructor
    28   */
     28   * @param root the XML-Element to load settings from
     29   */
    2930  GLGuiStyle::GLGuiStyle (const TiXmlElement* root)
    3031  {
     
    4748  }
    4849
     50  /**
     51   * @brief resets the Style to the default Settings.
     52   */
    4953  void GLGuiStyle::reset()
    5054  {
     
    6569  }
    6670
     71  /**
     72   * @brief loads Parameters for a Style from XML
     73   * @param root the XML-Element to load from.
     74   */
    6775  void GLGuiStyle::loadParams(const TiXmlElement* root)
    6876  {
     
    7684    LoadParam(root, "foreground-color", this, GLGuiStyle, setForegroundColorS);
    7785
    78     LoadParam(root, "feature-position", this, GLGuiStyle, setFeaturePosition);
     86    LoadParam(root, "feature-position", this, GLGuiStyle, setFeaturePositionS);
    7987    LoadParam(root, "Font", this, GLGuiStyle, setFont);
    8088
     
    8391  }
    8492
    85 
     93  /**
     94   * @brief sets the Width of the left border for all States
     95   * @param value the borderWidth
     96   */
    8697  void GLGuiStyle::setBorderLeft(float value)
    8798  {
     
    90101  }
    91102
     103  /**
     104   * @brief sets the Width of the left border.
     105   * @param value the borderWidth
     106   * @param state the State to set the borderwidth to
     107   */
    92108  void GLGuiStyle::setBorderLeft(float value, OrxGui::State state)
    93109  {
     
    95111  }
    96112
     113  /**
     114   * @brief sets the Width of the left border.
     115   * @param value the borderWidth
     116   * @param stateName the State to set the borderwidth to
     117   */
    97118  void GLGuiStyle::setBorderLeftS(float value, const std::string& stateName)
    98119  {
     
    104125  }
    105126
    106 
     127  /**
     128   * @brief sets the Width of the right border for all states.
     129   * @param value the borderWidth
     130   */
    107131  void GLGuiStyle::setBorderRight(float value)
    108132  {
     
    111135  }
    112136
     137  /**
     138   * @brief sets the Width of the right border.
     139   * @param value the borderWidth
     140   * @param state the State to setup.
     141   */
    113142  void GLGuiStyle::setBorderRight(float value, OrxGui::State state)
    114143  {
     
    116145  }
    117146
     147  /**
     148   * @brief sets the Width of the right border.
     149   * @param value the borderWidth
     150   * @param stateName the State to setup.
     151   */
    118152  void GLGuiStyle::setBorderRightS(float value, const std::string& stateName)
    119153  {
     
    126160
    127161
     162  /**
     163   * @brief sets the Width of the top border for all states.
     164   * @param value the borderWidth
     165   */
    128166  void GLGuiStyle::setBorderTop(float value)
    129167  {
     
    132170  }
    133171
     172  /**
     173   * @brief sets the Width of the top border.
     174   * @param value the borderWidth
     175   * @param state the State to setup.
     176   */
    134177  void GLGuiStyle::setBorderTop(float value, OrxGui::State state)
    135178  {
     
    137180  }
    138181
     182  /**
     183   * @brief sets the Width of the top border.
     184   * @param value the borderWidth
     185   * @param stateName the State to setup.
     186   */
    139187  void GLGuiStyle::setBorderTopS(float value, const std::string& stateName)
    140188  {
     
    147195
    148196
     197  /**
     198   * @brief sets the Width of the bottom border for all states.
     199   * @param value the borderWidth
     200   */
    149201  void GLGuiStyle::setBorderBottom(float value)
    150202  {
     
    153205  }
    154206
     207  /**
     208   * @brief sets the Width of the bottom border.
     209   * @param value the borderWidth
     210   * @param state the State to setup.
     211   */
    155212  void GLGuiStyle::setBorderBottom(float value, OrxGui::State state)
    156213  {
     
    158215  }
    159216
     217  /**
     218   * @brief sets the Width of the bottom border for all states.
     219   * @param value the borderWidth
     220   * @param stateName the State to setup.
     221   */
    160222  void GLGuiStyle::setBorderBottomS(float value, const std::string& stateName)
    161223  {
    162         OrxGui::State state;
    163   if (getState(stateName, &state))
    164     this->setBorderBottom(value, state);
    165   else
    166     this->setBorderBottom(value);
    167   }
    168 
    169 
     224    OrxGui::State state;
     225    if (getState(stateName, &state))
     226      this->setBorderBottom(value, state);
     227    else
     228      this->setBorderBottom(value);
     229  }
     230
     231
     232  /**
     233   * @brief sets the TextSize for all states.
     234   * @param value the TextSize
     235   */
    170236  void GLGuiStyle::setTextSize(float value)
    171237  {
     
    174240  }
    175241
     242  /**
     243   * @brief sets the TextSize.
     244   * @param value the TextSize.
     245   * @param state: the State to setup
     246   */
    176247  void GLGuiStyle::setTextSize(float value, OrxGui::State state)
    177248  {
     
    179250  }
    180251
     252  /**
     253   * @brief sets the TextSize.
     254   * @param value the TextSize.
     255   * @param stateName: the State to setup
     256   */
    181257  void GLGuiStyle::setTextSizeS(float value, const std::string& stateName)
    182258  {
     
    189265
    190266
     267  /**
     268   * @brief sets the Background Color for all States.
     269   * @param color the Color.
     270   */
    191271  void GLGuiStyle::setBackgroundColor(const Color& color)
    192272  {
     
    195275  }
    196276
     277  /**
     278   * @brief sets the Background Color.
     279   * @param color the Color.
     280   * @param state: the State to setup
     281   */
    197282  void GLGuiStyle::setBackgroundColor(const Color& color, OrxGui::State state)
    198283  {
     
    200285  }
    201286
     287  /**
     288   * @brief sets the Background Color.
     289   * @param r the Color's red part.
     290   * @param g the Color's green part.
     291   * @param b the Color's blue part.
     292   * @param a the Color's alpha part.
     293   * @param stateName: the State to setup
     294   */
    202295  void GLGuiStyle::setBackgroundColorS(float r, float g, float b, float a, const std::string& stateName)
    203296  {
     
    210303
    211304
     305  /**
     306   * @brief sets the Background Texture for all States.
     307   * @param texture the Texture.
     308   */
    212309  void GLGuiStyle::setBackgroundTexture(const Texture& texture)
    213310  {
     
    216313  }
    217314
     315  /**
     316   * @brief sets the Background Texture.
     317   * @param texture the Texture.
     318   * @param state the State to setup.
     319   */
    218320  void GLGuiStyle::setBackgroundTexture(const Texture& texture, OrxGui::State state)
    219321  {
     
    221323  }
    222324
     325  /**
     326   * @brief sets the Background Texture.
     327   * @param texture the Texture.
     328   * @param stateName the State to setup.
     329   */
    223330  void GLGuiStyle::setBackgroundTexture(const std::string& textureName, const std::string& stateName)
    224331  {
    225         OrxGui::State state;
    226   if (getState(stateName, &state))
    227     ; /// FIXME this->setBackgroundTexture(textureName, state);
    228   else
     332    OrxGui::State state;
     333    if (getState(stateName, &state))
     334      ; /// FIXME this->setBackgroundTexture(textureName, state);
     335    else
    229336      ; ///    this->setBackgroundTexture(textureName);
    230337  }
    231338
    232339
     340  /**
     341   * @brief sets the Foreground Color for all States.
     342   * @param color the Color.
     343   */
    233344  void GLGuiStyle::setForegroundColor(const Color& color)
    234345  {
     
    237348  }
    238349
     350  /**
     351   * @brief sets the Foreground Color.
     352   * @param color the Color.
     353   * @param state the State to setup
     354   */
    239355  void GLGuiStyle::setForegroundColor(const Color& color, OrxGui::State state)
    240356  {
     
    242358  }
    243359
     360  /**
     361   * @brief sets the Foreground Color.
     362   * @param r the Color's red part.
     363   * @param g the Color's green part.
     364   * @param b the Color's blue part.
     365   * @param a the Color's alpha part.
     366   * @param stateName: the State to setup
     367   */
    244368  void GLGuiStyle::setForegroundColorS(float r, float g, float b, float a, const std::string& stateName)
    245369  {
     
    252376
    253377
    254 
     378  /**
     379   * @brief sets the Feature-Position.
     380   * @param featurePosition the Feature-Position.
     381   */
    255382  void GLGuiStyle::setFeaturePosition(FeaturePosition featurePosition)
    256383  {
     
    258385  }
    259386
    260   void GLGuiStyle::setFeaturePosition(const std::string& featurePosition)
     387  /**
     388   * @brief sets the Feature-Position by converting from a String.
     389   * @param featurePosition the Feature-Position.
     390   */
     391  void GLGuiStyle::setFeaturePositionS(const std::string& featurePosition)
    261392  {
    262393    for (unsigned int i = 0; i < 4; ++i)
     
    269400  }
    270401
     402  /**
     403   * @brief sets the Font.
     404   * @param font the Font.
     405   */
    271406  void GLGuiStyle::setFont(Font* font)
    272407  {
     
    274409  }
    275410
     411  /**
     412   * @brief sets the font from a Font-Name.
     413   * @param fontName the FileName of the Font.
     414   */
    276415  void GLGuiStyle::setFont(const std::string& fontName)
    277416  {
     
    279418  }
    280419
    281 
     420  /**
     421   * @brief if Animation should be turned on.
     422   * @param animated true if on, false otherwise.
     423   */
    282424  void GLGuiStyle::setAnimated(bool animated)
    283425  {
     
    285427  }
    286428
     429  /**
     430   * @brief sets the AnimatedState.
     431   * @param animated: it states-changes should animate true, otherwise false.
     432   */
    287433  void GLGuiStyle::setAnimatedStateChanges(bool animated)
    288434  {
     
    291437
    292438
    293 
     439  /**
     440   * @param stateName the Name of a State.
     441   * @param state the found State is returned here if found.
     442   * @returns true if String is found, false otherwise.
     443   */
    294444  bool GLGuiStyle::getState(const std::string& stateName, OrxGui::State* state)
    295445  {
    296446    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
    297447      if (stateName == OrxGui::StateString[i])
    298     {
    299       *state = (OrxGui::State)i;
     448      {
     449        *state = (OrxGui::State)i;
    300450        return true;
    301     }
     451      }
    302452    return false;
    303453  }
    304 
    305454}
  • branches/gui/src/lib/gui/gl/glgui_style.h

    r8555 r8559  
    2626
    2727    /// Retrieve
     28    /** @returns left borderWidth @param state the State to retrieve from */
    2829    inline float borderLeft(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderLeft; }
     30    /** @returns right borderWidth @param state the State to retrieve from */
    2931    inline float borderRight(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderRight; }
     32    /** @returns top borderWidth @param state the State to retrieve from */
    3033    inline float borderTop(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderTop; }
     34    /** @returns bottom borderWidth @param state the State to retrieve from */
    3135    inline float borderBottom(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderBottom; }
     36    /** @returns textSize @param state the State to retrieve from */
    3237    inline float textSize(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._textSize; }
     38    /** @returns the Background Color @param state the State to retrieve from */
    3339    inline const Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundColor; }
     40    /** @returns background Texture. @param state the State to retrieve from */
    3441    inline const Texture& backgrorundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundTexture; }
     42    /** @returns the foreground Color @param state the State to retrieve from */
    3543    inline const Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._foregroundColor; }
    3644
     45    /** @returns FeaturePosition */
    3746    inline FeaturePosition featurePosition() const { return _featurePosition; }
     47    /** @returns the font */
    3848    inline const Font* const font() const { return _font; }
     49    /** @returns true if the Element is Animated */
    3950    inline bool animated() const { return _animated; }
     51    /** @returns true if State-Changes are animated */
    4052    inline bool animatedStateChanges() const { return _animatedStateChanges; }
    4153
     
    8092
    8193    void setFeaturePosition(FeaturePosition featurePosition);
    82     void setFeaturePosition(const std::string& featurePosition);
     94    void setFeaturePositionS(const std::string& featurePosition);
    8395
    8496    void setFont(Font* font);
     
    109121
    110122
    111     StatedStyle         _style[GLGUI_STATE_COUNT];
     123    StatedStyle         _style[GLGUI_STATE_COUNT]; //!< Styles configured for different States
    112124
    113125    FeaturePosition     _featurePosition;      //!< The Position a Feature will be layed at (checkbox(box), slider(text),...)
Note: See TracChangeset for help on using the changeset viewer.