![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * F r a m e W i n d o w W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2002 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXFrame.h,v 1.13 2002/01/18 22:42:53 jeroen Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXFRAME_H 00025 #define FXFRAME_H 00026 00027 #ifndef FXWINDOW_H 00028 #include "FXWindow.h" 00029 #endif 00030 00031 00032 00033 // Default padding 00034 #define DEFAULT_PAD 2 00035 00036 00037 /// Base Frame 00038 class FXAPI FXFrame : public FXWindow { 00039 FXDECLARE(FXFrame) 00040 protected: 00041 FXColor baseColor; 00042 FXColor hiliteColor; 00043 FXColor shadowColor; 00044 FXColor borderColor; 00045 FXint padtop; 00046 FXint padbottom; 00047 FXint padleft; 00048 FXint padright; 00049 FXint border; 00050 protected: 00051 FXFrame(); 00052 void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00053 void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00054 void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00055 void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00056 void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00057 void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00058 void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00059 void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00060 private: 00061 FXFrame(const FXFrame&); 00062 FXFrame &operator=(const FXFrame&); 00063 public: 00064 long onPaint(FXObject*,FXSelector,void*); 00065 public: 00066 00067 /// Construct frame window 00068 FXFrame(FXComposite* p,FXuint opts=FRAME_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD); 00069 00070 /// Return default width 00071 virtual FXint getDefaultWidth(); 00072 00073 /// Return default height 00074 virtual FXint getDefaultHeight(); 00075 00076 /// Change frame style 00077 void setFrameStyle(FXuint style); 00078 00079 /// Get current frame style 00080 FXuint getFrameStyle() const; 00081 00082 /// Get border width 00083 FXint getBorderWidth() const { return border; } 00084 00085 /// Change top padding 00086 void setPadTop(FXint pt); 00087 00088 /// Get top interior padding 00089 FXint getPadTop() const { return padtop; } 00090 00091 /// Change bottom padding 00092 void setPadBottom(FXint pb); 00093 00094 /// Get bottom interior padding 00095 FXint getPadBottom() const { return padbottom; } 00096 00097 /// Change left padding 00098 void setPadLeft(FXint pl); 00099 00100 /// Get left interior padding 00101 FXint getPadLeft() const { return padleft; } 00102 00103 /// Change right padding 00104 void setPadRight(FXint pr); 00105 00106 /// Get right interior padding 00107 FXint getPadRight() const { return padright; } 00108 00109 /// Change highlight color 00110 void setHiliteColor(FXColor clr); 00111 00112 /// Get highlight color 00113 FXColor getHiliteColor() const { return hiliteColor; } 00114 00115 /// Change shadow color 00116 void setShadowColor(FXColor clr); 00117 00118 /// Get shadow color 00119 FXColor getShadowColor() const { return shadowColor; } 00120 00121 /// Change border color 00122 void setBorderColor(FXColor clr); 00123 00124 /// Get border color 00125 FXColor getBorderColor() const { return borderColor; } 00126 00127 /// Change base gui color 00128 void setBaseColor(FXColor clr); 00129 00130 /// Get base gui color 00131 FXColor getBaseColor() const { return baseColor; } 00132 00133 /// Save to stream 00134 virtual void save(FXStream& store) const; 00135 00136 /// Load from stream 00137 virtual void load(FXStream& store); 00138 00139 /// Destructor 00140 virtual ~FXFrame(); 00141 }; 00142 00143 00144 00145 #endif