![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * D r a g C o r n e r 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: FXDragCorner.h,v 1.7 2002/01/18 22:42:52 jeroen Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDRAGCORNER_H 00025 #define FXDRAGCORNER_H 00026 00027 #ifndef FXWINDOW_H 00028 #include "FXWindow.h" 00029 #endif 00030 00031 00032 00033 /** 00034 * A drag corner widget may be placed in the bottom right corner 00035 * so as to allow the window to be resized more easily. 00036 */ 00037 class FXAPI FXDragCorner : public FXWindow { 00038 FXDECLARE(FXDragCorner) 00039 protected: 00040 FXColor hiliteColor; 00041 FXColor shadowColor; 00042 FXint oldw; 00043 FXint oldh; 00044 FXint xoff; 00045 FXint yoff; 00046 protected: 00047 FXDragCorner(); 00048 private: 00049 FXDragCorner(const FXDragCorner&); 00050 FXDragCorner &operator=(const FXDragCorner&); 00051 public: 00052 long onPaint(FXObject*,FXSelector,void*); 00053 long onLeftBtnPress(FXObject*,FXSelector,void*); 00054 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00055 long onMotion(FXObject*,FXSelector,void*); 00056 public: 00057 00058 /// Construct a drag corner 00059 FXDragCorner(FXComposite* p); 00060 00061 /// Get default width 00062 virtual FXint getDefaultWidth(); 00063 00064 /// Get default height 00065 virtual FXint getDefaultHeight(); 00066 00067 /// Change highlight color 00068 void setHiliteColor(FXColor clr); 00069 00070 /// Return current highlight color 00071 FXColor getHiliteColor() const { return hiliteColor; } 00072 00073 /// Change shadow color 00074 void setShadowColor(FXColor clr); 00075 00076 /// Return current shadow color 00077 FXColor getShadowColor() const { return shadowColor; } 00078 00079 /// Save drag corner to a stream 00080 virtual void save(FXStream& store) const; 00081 00082 /// Load drag corner from a stream 00083 virtual void load(FXStream& store); 00084 }; 00085 00086 00087 00088 #endif