Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SimpleGUI by
ContainerWidget.h
00001 #ifndef SIMPLEGUI_CONTAINER_WIDGET_H 00002 #define SIMPLEGUI_CONTAINER_WIDGET_H 00003 00004 #include "Widget.h" 00005 #include "Window.h" 00006 00007 /** 00008 * Simple container hold widgets side-by-side and draws a border 00009 * It will expand as needed to hold the widgets 00010 **/ 00011 class ContainerWidget : public Window 00012 { 00013 00014 public: 00015 00016 enum Layout { VERTICAL_LEFT, VERTICAL_RIGHT, VERTICAL_CENTER, HORIZONTAL, FIXED }; 00017 00018 ContainerWidget(GraphicsContext *context); 00019 00020 /** 00021 * Overrides 00022 **/ 00023 virtual void setSize(int width, int height); 00024 virtual void attach(Widget *child); 00025 00026 void setLayout(Layout l); 00027 00028 protected: 00029 00030 int _minWidth, _minHeight; 00031 Layout _layout; 00032 00033 /** 00034 * Override 00035 **/ 00036 virtual void _adjust(); 00037 00038 }; 00039 00040 #endif
Generated on Tue Jul 12 2022 22:27:14 by
