Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mmswidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
00021  *                                                                         *
00022  *   This library is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 #ifndef MMSWIDGET_H_
00033 #define MMSWIDGET_H_
00034 
00035 #include "mmstools/mmstafffile.h"
00036 #include "mmstools/mmslogger.h"
00037 #include "mmsgui/theme/mmstheme.h"
00038 #include "mmsgui/mmsguitools.h"
00039 
00040 // support old renamed methods
00041 #define searchForWidget     findWidget
00042 #define searchForWidgetType findWidgetType
00043 
00044 
00045 MMS_CREATEERROR(MMSWidgetError);
00046 
00047 
00048 //! The available types of widgets.
00049 typedef enum {
00050     //! A MMSHBoxWidget can contain 0 to n widgets. The widgets will be arranged in one horizontal row (0..n columns).
00051     MMSWIDGETTYPE_HBOX = 0,
00052     //! A MMSVBoxWidget can contain 0 to n widgets. The widgets will be arranged in one vertical column (0..n rows).
00053     MMSWIDGETTYPE_VBOX,
00054     //! A MMSButtonWidget can get the focus and therefore can process inputs.
00055     MMSWIDGETTYPE_BUTTON,
00056     //! A MMSImageWidget cannot get the focus but can be selected.
00057     MMSWIDGETTYPE_IMAGE,
00058     //! A MMSLabelWidget cannot get the focus but can be selected. It displays one line of text.
00059     MMSWIDGETTYPE_LABEL,
00060     //! A MMSMenuWidget can get the focus and therefore can process inputs. It displays one- or two-dimensional menus.
00061     MMSWIDGETTYPE_MENU,
00062     //! A MMSProgressBarWidget cannot get the focus but can be selected.
00063     MMSWIDGETTYPE_PROGRESSBAR,
00064     //! A MMSTextBoxWidget can get the focus and therefore can process inputs. It displays a formated multiline text.
00065     MMSWIDGETTYPE_TEXTBOX,
00066     //! A MMSArrowWidget cannot get the focus but can be selected.
00067     MMSWIDGETTYPE_ARROW,
00068     //! A MMSSliderWidget cannot get the focus per default. You can switch the focusable state to true. So the widget can process e.g. the arrow keys.
00069     MMSWIDGETTYPE_SLIDER,
00070     //! A MMSInputWidget can get the focus and therefore can process inputs. You can display and edit one line of text.
00071     MMSWIDGETTYPE_INPUT,
00072     //! A MMSCheckBoxWidget can get the focus and therefore can process inputs. You can display an on/off switch.
00073     MMSWIDGETTYPE_CHECKBOX,
00074     //! A MMSGapWidget is a spacer. It cannot have any children.
00075     MMSWIDGETTYPE_GAP,
00076     //! A MMSCanvasWidget is a canvas that enables to add custom widgets to dialogs.
00077     MMSWIDGETTYPE_CANVAS,
00078 
00079 } MMSWIDGETTYPE;
00080 
00081 
00082 //! define the window class
00083 class MMSWindow;
00084 
00085 extern string MMSWidget_inputmode;
00086 
00087 
00088 typedef int MMSWIDGET_SCROLL_MODE;
00089 
00090 #define MMSWIDGET_SCROLL_MODE_SETSELECTED   0x01
00091 #define MMSWIDGET_SCROLL_MODE_SETPRESSED    0x02
00092 #define MMSWIDGET_SCROLL_MODE_RMPRESSED     0x04
00093 
00094 
00095 //! This class is the base class for all widgets.
00096 /*!
00097 This class includes the base functionality available for all widgets within MMSGUI.
00098 This class cannot be constructed. Only widgets which are derived from this class can be constructed.
00099 \author Jens Schneider
00100 */
00101 class MMSWidget {
00102     private:
00103         //! type of the widget
00104         MMSWIDGETTYPE       type;
00105 
00106         //! describes attributes for drawable widgets
00107         typedef struct {
00108             //! access to the theme which is used
00109             MMSTheme            *theme;
00110             //! defaults from code
00111             MMSWidgetClass      *baseWidgetClass;
00112             //! settings from theme which overides defaults from code
00113             MMSWidgetClass      *widgetClass;
00114             //! settings from widget which overides settings from theme and defaults from code
00115             MMSWidgetClass      myWidgetClass;
00116 
00117             //! background image used for unselected state
00118             MMSFBSurface        *bgimage;
00119             //! background image used for selected state
00120             MMSFBSurface        *selbgimage;
00121             //! background image used for unselected-pressed state
00122             MMSFBSurface        *bgimage_p;
00123             //! background image used for selected-pressed state
00124             MMSFBSurface        *selbgimage_p;
00125             //! background image used for unselected-inactive state
00126             MMSFBSurface        *bgimage_i;
00127             //! background image used for selected-inactive state
00128             MMSFBSurface        *selbgimage_i;
00129 
00130             //! border images used for unselected state
00131             MMSFBSurface        *borderimages[MMSBORDER_IMAGE_NUM_SIZE];
00132             //! geometry for border images (unselected state)
00133             MMSFBRectangle      bordergeom[MMSBORDER_IMAGE_NUM_SIZE];
00134             //! geometry for border images already set (unselected state)
00135             bool                bordergeomset;
00136 
00137             //! border images used for selected state
00138             MMSFBSurface        *borderselimages[MMSBORDER_IMAGE_NUM_SIZE];
00139             //! geometry for border images (selected state)
00140             MMSFBRectangle      borderselgeom[MMSBORDER_IMAGE_NUM_SIZE];
00141             //! geometry for border images already set (selected state)
00142             bool                borderselgeomset;
00143 
00144             //! widget which represents e.g. an arrow which selected state will be switched to true if content of widget can be scrolled up
00145             MMSWidget   *upArrowWidget;
00146             //! widget which represents e.g. an arrow which selected state will be switched to true if content of widget can be scrolled down
00147             MMSWidget   *downArrowWidget;
00148             //! widget which represents e.g. an arrow which selected state will be switched to true if content of widget can be scrolled left
00149             MMSWidget   *leftArrowWidget;
00150             //! widget which represents e.g. an arrow which selected state will be switched to true if content of widget can be scrolled right
00151             MMSWidget   *rightArrowWidget;
00152             //! the arrow widgets are initial drawn?
00153             bool        initialArrowsDrawn;
00154 
00155             //! widget to which is to navigate if user press cursor up
00156             MMSWidget   *navigateUpWidget;
00157             //! widget to which is to navigate if user press cursor down
00158             MMSWidget   *navigateDownWidget;
00159             //! widget to which is to navigate if user press cursor left
00160             MMSWidget   *navigateLeftWidget;
00161             //! widget to which is to navigate if user press cursor right
00162             MMSWidget   *navigateRightWidget;
00163 
00164             //! vertical slider widget
00165             MMSWidget   *vSliderWidget;
00166             //! horizontal slider widget
00167             MMSWidget   *hSliderWidget;
00168 
00169             //! store last input event here
00170             MMSInputEvent   last_inputevent;
00171 
00172             //! store input rectangle, this is the rectangle on which the button was pressed
00173             MMSFBRectangle  pressed_inputrect;
00174 
00175             //! current scroll posx
00176             unsigned int scrollPosX;
00177             //! current scroll posy
00178             unsigned int scrollPosY;
00179             //! horizontal scroll distance
00180             unsigned int scrollDX;
00181             //! vertical scroll distance
00182             unsigned int scrollDY;
00183 
00184             //! widget which status should changed just like this widget
00185             MMSWidget   *joinedWidget;
00186 
00187         } MMSWIDGET_DRAWABLE_ATTRIBUTES;
00188 
00189         //! save attributes for drawable widgets
00190         MMSWIDGET_DRAWABLE_ATTRIBUTES   *da;
00191 
00192 
00193         //! id of the widget
00194         int     id;
00195 
00196         //! name of the widget
00197         string  name;
00198 
00199         //! size of the widget
00200         string  sizehint;
00201 
00202         //! if true, at least one of min/max values set and widget is marked as a dynamic widget
00203         bool    minmax_set;
00204 
00205         //! dynamic widget: minimum width
00206         string  min_width;
00207 
00208         //! dynamic widget: minimum width in pixel
00209         int     min_width_pix;
00210 
00211         //! dynamic widget: minimum height
00212         string  min_height;
00213 
00214         //! dynamic widget: minimum height in pixel
00215         int     min_height_pix;
00216 
00217         //! dynamic widget: maximum width
00218         string  max_width;
00219 
00220         //! dynamic widget: maximum width in pixel
00221         int     max_width_pix;
00222 
00223         //! dynamic widget: maximum height
00224         string  max_height;
00225 
00226         //! dynamic widget: maximum height in pixel
00227         int     max_height_pix;
00228 
00229         //! dynamic widget: first initialization of content width/height is done
00230         bool    content_size_initialized;
00231 
00232         //! dynamic widget: width of content in pixel
00233         int content_width;
00234 
00235         //! dynamic widget: height of content in pixel
00236         int content_height;
00237 
00238         //! dynamic widget: width of the content of a child in pixel
00239         int content_width_child;
00240 
00241         //! dynamic widget: height of the content of a child in pixel
00242         int content_height_child;
00243 
00244 
00245 
00246         //! optional & application specific pointer to any data
00247         void *bindata;
00248 
00249         //! window to which the widget is connected
00250         MMSWindow   *rootwindow;
00251 
00252         //! the toplevel parent window
00253         MMSWindow   *parent_rootwindow;
00254 
00255         //! is widget drawable?
00256         bool drawable;
00257 
00258         //! should parent widget be drawn before drawing this widget?
00259         bool needsparentdraw;
00260 
00261         //! initial setting: focusable flag
00262         bool focusable_initial;
00263 
00264         //! initial setting: selectable flag
00265         bool selectable_initial;
00266 
00267         //! initial setting: clickable flag
00268         bool clickable_initial;
00269 
00270         //! children allowed?
00271         bool canhavechildren;
00272 
00273         //! children's selected state can be changed?
00274         bool canselectchildren;
00275 
00276         //! visible?
00277         bool visible;
00278 
00279         //! focused?
00280         bool focused;
00281 
00282         //! selected?
00283         bool selected;
00284 
00285         //! button pressed?
00286         bool pressed;
00287 
00288         //! brightness of the widget 0..255, default 255
00289         unsigned char brightness;
00290 
00291         //! opacity of the widget 0..255, default 255
00292         unsigned char opacity;
00293 
00294         //! widget is using a subsurface or has an own surface?
00295         bool has_own_surface;
00296 
00297 
00298         //! if skip refresh is true, refresh() method will not work
00299         bool            skip_refresh;
00300 
00301         //! current background values set?
00302         bool            current_bgset;
00303 
00304         //! current background color
00305         MMSFBColor      current_bgcolor;
00306 
00307         //! current background image
00308         MMSFBSurface    *current_bgimage;
00309 
00310 
00311 
00312 
00313         bool loadArrowWidgets();
00314         virtual void switchArrowWidgets();
00315 
00316         bool create(MMSWindow *root, bool drawable, bool needsparentdraw, bool focusable, bool selectable,
00317                     bool canhavechildren, bool canselectchildren, bool clickable);
00318 
00319         virtual bool init();
00320         virtual bool release();
00321 
00322 
00323         //! Internal method: Set width and height of the content.
00324         bool setContentSize(int content_width, int content_height);
00325 
00326         //! Internal method: Can be overridden by a specific widget which calculate it's own size from children.
00327         virtual void setContentSizeFromChildren();
00328 
00329         //! Internal method: Get width and height of the content, return false if content size is not set.
00330         bool getContentSize(int *content_width, int *content_height);
00331 
00332         //! Internal method: First setup of the content size, called during initialization of a window.
00333         void initContentSize();
00334 
00335         //! Internal method: Should be overridden by widgets which have a dynamic size based on content.
00336         virtual void calcContentSize();
00337 
00338         //! Internal method: Recalculate content size and refresh window if requested.
00339         bool recalcContentSize(bool refresh = true);
00340 
00341 
00342 
00343         //! Internal method: get the color or/and image of widget's background dependent on the current state
00344         void getBackground(MMSFBColor *color, MMSFBSurface **image);
00345 
00346         //! Internal method: (re-)enable refresh status
00347         virtual bool enableRefresh(bool enable = true);
00348 
00349         //! Internal method: check drawn background against new background and (re-)enable refresh status if needed
00350         virtual bool checkRefreshStatus();
00351 
00352 
00353         virtual bool draw(bool *backgroundFilled = NULL);
00354         void drawMyBorder();
00355         bool drawDebug();
00356 
00357         //! Internal method: Inform the widget, that the theme has changed.
00358         void themeChanged(string &themeName);
00359 
00360 
00361         virtual bool setSelected(bool set, bool refresh, bool *changed, bool joined);
00362         virtual bool setPressed(bool set, bool refresh, bool joined);
00363 
00364         void resetPressed();
00365 
00366     public:
00367         MMSWidget();
00368         virtual ~MMSWidget();
00369         MMSWIDGETTYPE getType();
00370         string getTypeString();
00371 
00372         void copyWidget(MMSWidget *newWidget);
00373         virtual MMSWidget *copyWidget() = 0;
00374 
00375         MMSWidget* getChild(unsigned int atpos = 0);
00376         MMSWidget* disconnectChild(unsigned int atpos = 0);
00377         MMSWidget* findWidget(string name);
00378         MMSWidget* findWidgetType(MMSWIDGETTYPE type);
00379         MMSWidget* getLastWidget();
00380         MMSWidget* operator[](string name);
00381 
00382         virtual void add(MMSWidget *widget);
00383         MMSWindow *getRootWindow(MMSWindow **parentroot = NULL);
00384         virtual void setGeometry(MMSFBRectangle geom);
00385         MMSFBRectangle getGeometry();
00386         MMSFBRectangle getRealGeometry();
00387         MMSFBRectangle getInnerGeometry();
00388         MMSFBRectangle getSurfaceGeometry();
00389 
00390         MMSFBSurface *getSurface();
00391 
00392         int getId();
00393         string getName();
00394         void   setName(string name);
00395         void setParent(MMSWidget *parent);
00396         MMSWidget *getParent();
00397 
00398         void getJoinedWigdets(MMSWidget **caller_stack);
00399 
00400         virtual void setFocus(bool set, bool refresh = true, MMSInputEvent *inputevent = NULL);
00401         bool isFocused();
00402         bool setSelected(bool set, bool refresh = true);
00403         bool isSelected();
00404         void unsetFocusableForAllChildren(bool refresh);
00405 
00406         bool isActivated();
00407 
00408         bool setPressed(bool set, bool refresh = true);
00409         bool isPressed();
00410 
00411         void setASelected(bool set, bool refresh = true);
00412         void setPSelected(bool set, bool refresh = true);
00413         void setISelected(bool set, bool refresh = true);
00414 
00415         bool isDrawable();
00416         bool needsParentDraw(bool checkborder = true);
00417         bool canHaveChildren();
00418         bool canSelectChildren();
00419 
00420         void setBinData(void *data);
00421         void *getBinData();
00422         string getSizeHint();
00423         bool setSizeHint(string &hint);
00424         string getMinWidth();
00425         int getMinWidthPix();
00426         bool setMinWidth(string &min_width);
00427         string getMinHeight();
00428         int getMinHeightPix();
00429         bool setMinHeight(string &min_height);
00430         string getMaxWidth();
00431         int getMaxWidthPix();
00432         bool setMaxWidth(string &max_width);
00433         string getMaxHeight();
00434         int getMaxHeightPix();
00435         bool setMaxHeight(string &max_height);
00436         bool isGeomSet();
00437         void setGeomSet(bool set);
00438 
00439         bool isVisible();
00440         virtual void setVisible(bool visible, bool refresh = true);
00441 
00442         unsigned char getBrightness();
00443         void setBrightness(unsigned char brightness, bool refresh = true);
00444 
00445         unsigned char getOpacity();
00446         void setOpacity(unsigned char opacity, bool refresh = true);
00447 
00448         MMSWidget *getNavigateUpWidget();
00449         MMSWidget *getNavigateDownWidget();
00450         MMSWidget *getNavigateLeftWidget();
00451         MMSWidget *getNavigateRightWidget();
00452         void setNavigateUpWidget(MMSWidget *upwidget);
00453         void setNavigateDownWidget(MMSWidget *downwidget);
00454         void setNavigateRightWidget(MMSWidget *rightwidget);
00455         void setNavigateLeftWidget(MMSWidget *leftwidget);
00456 
00457         bool canNavigateUp();
00458         bool canNavigateDown();
00459         bool canNavigateLeft();
00460         bool canNavigateRight();
00461 
00462         virtual bool scrollDown(unsigned int count = 1, bool refresh = true, bool test = false, bool leave_selection = false);
00463         virtual bool scrollUp(unsigned int count = 1, bool refresh = true, bool test = false, bool leave_selection = false);
00464         virtual bool scrollRight(unsigned int count = 1, bool refresh = true, bool test = false, bool leave_selection = false);
00465         virtual bool scrollLeft(unsigned int count = 1, bool refresh = true, bool test = false, bool leave_selection = false);
00466         virtual bool scrollTo(int posx, int posy, bool refresh = true, bool *changed = NULL,
00467                               MMSWIDGET_SCROLL_MODE mode = MMSWIDGET_SCROLL_MODE_SETSELECTED, MMSFBRectangle *inputrect = NULL);
00468 
00469         sigc::signal<void, MMSWidget*> *onSelect;
00470         sigc::signal<void, MMSWidget*, bool> *onFocus;
00471         sigc::signal<void, MMSWidget*> *onReturn;
00472 
00473         //! Set one or more callbacks for the onClick event.
00474         /*!
00475         The connected callbacks will be called after the button release event.
00476 
00477         A callback method must be defined like this:
00478 
00479             void myclass::mycallbackmethod(MMSWidget *widget, int posx, int posy, int widget_width, int widget_height);
00480 
00481             \param widget           is the pointer to the widget
00482             \param posx             x-position of the maus pointer within the widget
00483             \param posy             y-position of the maus pointer within the widget
00484             \param widget_width     width of the widget
00485             \param widget_height    height of the widget
00486 
00487         To connect your callback to onClick do this:
00488 
00489             mywidget->onClick->connect(sigc::mem_fun(myobject,&myclass::mycallbackmethod));
00490         */
00491         sigc::signal<void, MMSWidget*, int, int, int, int> *onClick;
00492 
00493     protected:
00494         virtual void drawchildren(bool toRedrawOnly = false, bool *backgroundFilled = NULL, MMSFBRectangle *rect2update = NULL);
00495         virtual void setRootWindow(MMSWindow *root, MMSWindow *parentroot = NULL);
00496         virtual void recalculateChildren();
00497         virtual void handleInput(MMSInputEvent *inputevent);
00498 
00499         virtual bool callOnReturn();
00500         bool emitOnReturnCallback();
00501 
00502         bool geomset;
00503 
00504         //! is widget initialized?
00505         bool    initialized;
00506 
00507 
00508         bool toRedraw;
00509         bool redrawChildren;
00510         void markChildren2Redraw();
00511         virtual MMSWidget *getDrawableParent(bool mark2Redraw = false, bool markChildren2Redraw = false,
00512                                              bool checkborder = true, vector<MMSWidget*> *wlist = NULL, bool followpath = false);
00513 //        void refresh();
00514 
00515         MMSFBSurface *windowSurface;
00516 
00517         MMSFBSurface *surface;
00518         MMSFBRectangle surfaceGeom;
00519 
00520         virtual bool setSurfaceGeometry(unsigned int width = 0, unsigned int height = 0);
00521         virtual void setInnerGeometry();
00522 
00523         bool setScrollSize(unsigned int dX = 8, unsigned int dY = 8);
00524         bool setScrollPos(int posX = 0, int posY = 0, bool refresh = true, bool test = false);
00525         MMSFBRectangle getVisibleSurfaceArea();
00526         void updateWindowSurfaceWithSurface(bool useAlphaChannel);
00527 
00528         MMSWidget *parent;
00529         vector<MMSWidget *> children;
00530 
00531         MMSFBRectangle geom;
00532         MMSFBRectangle innerGeom;
00533 
00534     public:
00535         void refresh(bool required = true);
00536 
00537         /* theme access methods */
00538         bool    getBgColor(MMSFBColor &bgcolor);
00539         bool    getSelBgColor(MMSFBColor &selbgcolor);
00540         bool    getBgColor_p(MMSFBColor &bgcolor_p);
00541         bool    getSelBgColor_p(MMSFBColor &selbgcolor_p);
00542         bool    getBgColor_i(MMSFBColor &bgcolor_i);
00543         bool    getSelBgColor_i(MMSFBColor &selbgcolor_i);
00544         bool    getBgImagePath(string &bgimagepath);
00545         bool    getBgImageName(string &bgimagename);
00546         bool    getSelBgImagePath(string &selbgimagepath);
00547         bool    getSelBgImageName(string &selbgimagename);
00548         bool    getBgImagePath_p(string &bgimagepath_p);
00549         bool    getBgImageName_p(string &bgimagename_p);
00550         bool    getSelBgImagePath_p(string &selbgimagepath_p);
00551         bool    getSelBgImageName_p(string &selbgimagename_p);
00552         bool    getBgImagePath_i(string &bgimagepath_i);
00553         bool    getBgImageName_i(string &bgimagename_i);
00554         bool    getSelBgImagePath_i(string &selbgimagepath_i);
00555         bool    getSelBgImageName_i(string &selbgimagename_i);
00556         bool    getMargin(unsigned int &margin);
00557         bool    getFocusable(bool &focusable, bool check_selectable = true);
00558         bool    getSelectable(bool &selectable);
00559         bool    getUpArrow(string &uparrow);
00560         bool    getDownArrow(string &downarrow);
00561         bool    getLeftArrow(string &leftarrow);
00562         bool    getRightArrow(string &rightarrow);
00563         bool    getData(string &data);
00564         bool    getNavigateUp(string &navigateup);
00565         bool    getNavigateDown(string &navigatedown);
00566         bool    getNavigateLeft(string &navigateleft);
00567         bool    getNavigateRight(string &navigateright);
00568         bool    getVSlider(string &vslider);
00569         bool    getHSlider(string &hslider);
00570         bool    getImagesOnDemand(bool &imagesondemand);
00571         bool    getBlend(unsigned int &blend);
00572         bool    getBlendFactor(double &blendfactor);
00573         bool    getScrollOnFocus(bool &scrollonfocus);
00574         bool    getClickable(bool &clickable);
00575         bool    getReturnOnScroll(bool &returnonscroll);
00576         bool    getInputMode(string &inputmode);
00577         bool    getInputModeEx(string &inputmode);
00578         bool    getJoinedWidget(string &joinedwidget);
00579         bool    getActivated(bool &activated);
00580 
00581         bool    getBorderColor(MMSFBColor &color);
00582         bool    getBorderSelColor(MMSFBColor &selcolor);
00583         bool    getBorderImagePath(string &imagepath);
00584         bool    getBorderImageNames(MMSBORDER_IMAGE_NUM num, string &imagename);
00585         bool    getBorderSelImagePath(string &selimagepath);
00586         bool    getBorderSelImageNames(MMSBORDER_IMAGE_NUM num, string &selimagename);
00587         bool    getBorderThickness(unsigned int &thickness);
00588         bool    getBorderMargin(unsigned int &margin);
00589         bool    getBorderRCorners(bool &rcorners);
00590 
00591         bool setBgColor(MMSFBColor bgcolor, bool refresh = true);
00592         bool setSelBgColor(MMSFBColor selbgcolor, bool refresh = true);
00593         bool setBgColor_p(MMSFBColor bgcolor_p, bool refresh = true);
00594         bool setSelBgColor_p(MMSFBColor selbgcolor_p, bool refresh = true);
00595         bool setBgColor_i(MMSFBColor bgcolor_i, bool refresh = true);
00596         bool setSelBgColor_i(MMSFBColor selbgcolor_i, bool refresh = true);
00597         bool setBgImagePath(string bgimagepath, bool load = true, bool refresh = true);
00598         bool setBgImageName(string bgimagename, bool load = true, bool refresh = true);
00599         bool setSelBgImagePath(string selbgimagepath, bool load = true, bool refresh = true);
00600         bool setSelBgImageName(string selbgimagename, bool load = true, bool refresh = true);
00601         bool setBgImagePath_p(string bgimagepath_p, bool load = true, bool refresh = true);
00602         bool setBgImageName_p(string bgimagename_p, bool load = true, bool refresh = true);
00603         bool setSelBgImagePath_p(string selbgimagepath_p, bool load = true, bool refresh = true);
00604         bool setSelBgImageName_p(string selbgimagename_p, bool load = true, bool refresh = true);
00605         bool setBgImagePath_i(string bgimagepath_i, bool load = true, bool refresh = true);
00606         bool setBgImageName_i(string bgimagename_i, bool load = true, bool refresh = true);
00607         bool setSelBgImagePath_i(string selbgimagepath_i, bool load = true, bool refresh = true);
00608         bool setSelBgImageName_i(string selbgimagename_i, bool load = true, bool refresh = true);
00609         bool setMargin(unsigned int margin, bool refresh = true);
00610         bool setFocusable(bool focusable, bool refresh = true);
00611         bool setSelectable(bool selectable, bool refresh = true);
00612         bool setUpArrow(string uparrow, bool refresh = true);
00613         bool setDownArrow(string downarrow, bool refresh = true);
00614         bool setLeftArrow(string leftarrow, bool refresh = true);
00615         bool setRightArrow(string rightarrow, bool refresh = true);
00616         bool setData(string data);
00617         bool setNavigateUp(string navigateup);
00618         bool setNavigateDown(string navigatedown);
00619         bool setNavigateLeft(string navigateleft);
00620         bool setNavigateRight(string navigateright);
00621         bool setVSlider(string vslider);
00622         bool setHSlider(string hslider);
00623         bool setImagesOnDemand(bool imagesondemand);
00624         bool setBlend(unsigned int blend, bool refresh = true);
00625         bool setBlendFactor(double blendfactor, bool refresh = true);
00626         bool setScrollOnFocus(bool scrollonfocus);
00627         bool setClickable(bool clickable);
00628         bool setReturnOnScroll(bool returnonscroll);
00629         bool setInputMode(string inputmode);
00630         bool setJoinedWidget(string joinedwidget);
00631         bool setActivated(bool activated, bool refresh = true);
00632 
00633         bool setBorderColor(MMSFBColor bordercolor, bool refresh = true);
00634         bool setBorderSelColor(MMSFBColor borderselcolor, bool refresh = true);
00635         bool setBorderImagePath(string borderimagepath, bool load = true, bool refresh = true);
00636         bool setBorderImageNames(string imagename_1, string imagename_2, string imagename_3, string imagename_4,
00637                                  string imagename_5, string imagename_6, string imagename_7, string imagename_8,
00638                                  bool load = true, bool refresh = true);
00639         bool setBorderSelImagePath(string borderselimagepath, bool load = true, bool refresh = true);
00640         bool setBorderSelImageNames(string selimagename_1, string selimagename_2, string selimagename_3, string selimagename_4,
00641                                     string selimagename_5, string selimagename_6, string selimagename_7, string selimagename_8,
00642                                     bool load = true, bool refresh = true);
00643         bool setBorderThickness(unsigned int borderthickness, bool refresh = true);
00644         bool setBorderMargin(unsigned int bordermargin, bool refresh = true);
00645         bool setBorderRCorners(bool borderrcorners, bool refresh = true);
00646 
00647         void updateFromThemeClass(MMSWidgetClass *themeClass);
00648 
00649     // friends
00650     friend class MMSDialogManager;
00651     friend class MMSWindow;
00652     friend class MMSHBoxWidget;
00653     friend class MMSVBoxWidget;
00654     friend class MMSLabelWidget;
00655     friend class MMSButtonWidget;
00656     friend class MMSImageWidget;
00657     friend class MMSProgressBarWidget;
00658     friend class MMSMenuWidget;
00659     friend class MMSTextBoxWidget;
00660     friend class MMSArrowWidget;
00661     friend class MMSSliderWidget;
00662     friend class MMSInputWidget;
00663     friend class MMSCheckBoxWidget;
00664     friend class MMSGapWidget;
00665     friend class MMSCanvasWidget;
00666 };
00667 
00668 #include "mmswindow.h"
00669 
00670 #endif /*MMSWIDGET_H_*/

Generated by doxygen