SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // missing_desc 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00011 /****************************************************************************/ 00012 // 00013 // This file is part of SUMO. 00014 // SUMO is free software: you can redistribute it and/or modify 00015 // it under the terms of the GNU General Public License as published by 00016 // the Free Software Foundation, either version 3 of the License, or 00017 // (at your option) any later version. 00018 // 00019 /****************************************************************************/ 00020 #ifndef MFXCheckableButton_h 00021 #define MFXCheckableButton_h 00022 00023 00024 // =========================================================================== 00025 // included modules 00026 // =========================================================================== 00027 #ifdef _MSC_VER 00028 #include <windows_config.h> 00029 #else 00030 #include <config.h> 00031 #endif 00032 00033 #include <fx.h> 00034 00035 class MFXCheckableButton : public FXButton { 00036 FXDECLARE(MFXCheckableButton) 00037 public: 00038 MFXCheckableButton(bool amChecked, FXComposite* p, const FXString& text, 00039 FXIcon* ic = NULL, FXObject* tgt = NULL, FXSelector sel = 0, 00040 FXuint opts = BUTTON_NORMAL, 00041 FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, 00042 FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD); 00043 ~MFXCheckableButton(); 00044 bool amChecked() const; 00045 void setChecked(bool val); 00046 long onPaint(FXObject*, FXSelector, void*); 00047 long onUpdate(FXObject*, FXSelector, void*); 00048 00049 00050 private: 00051 void buildColors(); 00052 void setColors(); 00053 00054 private: 00055 bool myAmChecked; 00056 FXColor myBackColor, myDarkColor, myHiliteColor, myShadowColor; 00057 00058 bool myAmInitialised; 00059 00060 protected: 00061 MFXCheckableButton() { } 00062 }; 00063 00064 00065 #endif 00066 00067 /****************************************************************************/ 00068