|
CARMA C++
|
Container that handles layout of components with a "BoxLayout". More...
#include <carma/ui/rtd/common/RtDisplay.h>
Public Types | |
| enum | BoxType { BOX_HORIZONTAL, BOX_VERTICAL, BOX_FOLDER } |
| enum | StretchType { STRETCH_PROPORTIONAL, STRETCH_SPRING } |
Public Member Functions | |
| virtual void | serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj) |
| Creates static description of container to stdout. More... | |
| void | setProp () |
| Set stretchType to proportional. More... | |
| void | setSpring () |
| Set stretchType to SPRING. More... | |
| void | setStretchFactor (double stretchFactor) |
| Set stretch factor. More... | |
Public Member Functions inherited from carma::ui::rtd::RtContainer | |
| RtObjectPtr | add (RtObjectPtr rtObject) |
| Insert an object into the container. More... | |
| Border | getBorder () const |
| ::size_t | getNumObjects () const |
| Get the number of objects in the container. More... | |
| RtObjectPtr | getObj (::size_t index) const |
| Get object from the container by index. More... | |
| RtObjectPtr | replace (unsigned int i, RtObjectPtr rtObject) |
| Replace an object in the container. More... | |
| RtObjectPtr | replace (RtObjectPtr oldObj, RtObjectPtr newObj) |
| void | setBorder (Border border) |
| Set the border code. More... | |
| virtual void | update () |
| Update all objects contained by container. More... | |
| virtual | ~RtContainer () |
| Destructor. More... | |
Public Member Functions inherited from carma::ui::rtd::RtTitledObj | |
| std::string | getTitle () |
| Get title. More... | |
| void | setTitle (const std::string &title) |
| Set title for object. More... | |
Public Member Functions inherited from carma::ui::rtd::RtObject | |
| void | appendToolTipText (const std::string &text) |
| Append more text to the existing tool tip text. More... | |
| Layout | getLayout () const |
| Get the layout for this object. More... | |
| std::string | getToolTipText () |
| void | setFontSize (int fontSize) |
| Set the absolute font size for this object. More... | |
| void | setLayout (Layout layout) |
| Set the layout for this object. More... | |
| void | setToolTipText (const std::string &text) |
| Set the tool tip text for this RtObject. More... | |
| virtual | ~RtObject () |
| Destructor. More... | |
Protected Member Functions | |
| RtBox (BoxType type, const std::string &title) | |
| Constructor. More... | |
| RtBox (BoxType type, Border border) | |
| Constructor. More... | |
| RtBox (BoxType type, const std::string &title, Border border) | |
| Constructor. More... | |
Protected Member Functions inherited from carma::ui::rtd::RtContainer | |
| RtContainer () | |
| Constructor. More... | |
| RtContainer (const ::std::string &title) | |
| Constructor. More... | |
| RtContainer (Border border) | |
| Constructor. More... | |
| RtContainer (const ::std::string &title, Border border) | |
| Constructor. More... | |
Protected Member Functions inherited from carma::ui::rtd::RtTitledObj | |
| RtTitledObj (const std::string &title) | |
| Constructor. More... | |
Protected Member Functions inherited from carma::ui::rtd::RtObject | |
| int | getFontSize (int parentFontSize) const |
| Get the absolute font size for this object. More... | |
| int | getFontSize () const |
| Get the absolute font size for this object. More... | |
| RtObject () | |
| Constructor. More... | |
Additional Inherited Members | |
Protected Types inherited from carma::ui::rtd::RtContainer | |
|
typedef ::std::vector < RtObjectPtr > | ObjectContainerType |
Protected Attributes inherited from carma::ui::rtd::RtContainer | |
| size_t | numObjects_ |
| ObjectContainerType | objects_ |
Protected Attributes inherited from carma::ui::rtd::RtTitledObj | |
| std::string | title_ |
| Object title. More... | |
Container that handles layout of components with a "BoxLayout".
Component layout is controlled by the types listed below, but an interface is not yet provided for all components.
The stretchType controls sizing of components in direction parallel to the layout. Proportional and springs should not be used in the same layout, as the springs will take all of the free space so the proportional will not get a chance to grow. If contraction is necessary because there is not enough space then all the components except INCOMPRESSIBLE ones will be scaled proportionally. In general, extra space is taken by the most agressive components in the layout first, leaving little or none to the others. Most agressive is SPRING followed by PROPORTIONAL, then FRACTIONAL. PROPORTIONAL and FRACTIONAL will split extra space with the FRACTIONALs being treated as having a weight of 1.
Summary of Stretch types:
Definition at line 1918 of file RtDisplay.h.
|
protected |
|
protected |
|
protected |
Constructor.
| title | title for box |
| border | single character codes for the border. |
|
virtual |
Creates static description of container to stdout.
Implements carma::ui::rtd::RtContainer.
| void carma::ui::rtd::RtBox::setProp | ( | ) |
Set stretchType to proportional.
| void carma::ui::rtd::RtBox::setSpring | ( | ) |
Set stretchType to SPRING.
| void carma::ui::rtd::RtBox::setStretchFactor | ( | double | stretchFactor | ) |
Set stretch factor.