Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2006, 11:13:00 AM (18 years ago)
Author:
bensch
Message:

added a fixed positionBox, so that everything can be centered

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/gui/gl/glgui_fixedposition_box.h

    r9541 r9546  
    11/*!
    2  * @file glgui_.h
    3  * The gl_box widget of th openglGUI
    4  *
     2 * @file glgui_fixedposition_box.h
     3 * The gl_fixedposition_box widget of th openglGUi
    54 */
    65
    7 #ifndef _GLGUI_BOX_H
    8 #define _GLGUI_BOX_H
     6#ifndef _GLGUI_FIXEDPOSITION_BOX_H
     7#define _GLGUI_FIXEDPOSITION_BOX_H
    98
    109#include "glgui_container.h"
     
    1716   *
    1817   */
    19   class GLGuiBox : public GLGuiContainer
     18  class GLGuiFixedpositionBox : public GLGuiBox
    2019  {
    2120
    2221  public:
    23     GLGuiBox(OrxGui::Orientation orientation = OrxGui::Vertical);
    24     virtual ~GLGuiBox();
     22    GLGuiFixedpositionBox(OrxGui::Position position = OrxGui::Center, OrxGui::Orientation orientation = OrxGui::Vertical);
     23    virtual ~GLGuiFixedpositionBox();
    2524
    26     /** @returns the Orientation of the Box */
    27     OrxGui::Orientation orientation() const { return this->_orientation; };
    28     /** @param orientation the Orientation of the Box */
    29     void setOrientation(OrxGui::Orientation orientation) { this->_orientation = orientation; };
     25    inline OrxGui::Position position() const { return _position; };
     26    void setPosition(OrxGui::Position);
    3027
    31     virtual void pack(GLGuiWidget* widget);
    32     virtual void unpack(GLGuiWidget* widget);
    33     virtual void clear();
    34 
    35     virtual void showAll();
    36     virtual void hideAll();
    37 
    38     virtual void draw() const;
    3928
    4029  protected:
    4130    virtual void resize();
    4231
     32
    4333  private:
    44     void init();
    45 
    46     Orientation                _orientation;
    47     std::vector<GLGuiWidget*>  children;
     34    OrxGui::Position     _position;     //!< The Fixed position of the Widget.
    4835  };
    4936}
    50 #endif /* _GLGUI__H */
     37#endif /* _GLGUI_FIXEDPOSITION_BOX_H */
Note: See TracChangeset for help on using the changeset viewer.