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,2006 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.15 2006/01/22 17:58:01 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDRAGCORNER_H 00025 #define FXDRAGCORNER_H 00026 00027 #ifndef FXWINDOW_H 00028 #include "FXWindow.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 /** 00035 * A drag corner widget may be placed in the bottom right corner 00036 * so as to allow the window to be resized more easily. 00037 */ 00038 class FXAPI FXDragCorner : public FXWindow { 00039 FXDECLARE(FXDragCorner) 00040 protected: 00041 FXColor hiliteColor; 00042 FXColor shadowColor; 00043 FXint oldw; 00044 FXint oldh; 00045 FXint xoff; 00046 FXint yoff; 00047 FXbool ewmh; 00048 protected: 00049 FXDragCorner(); 00050 private: 00051 FXDragCorner(const FXDragCorner&); 00052 FXDragCorner &operator=(const FXDragCorner&); 00053 public: 00054 long onPaint(FXObject*,FXSelector,void*); 00055 long onLeftBtnPress(FXObject*,FXSelector,void*); 00056 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00057 long onMotion(FXObject*,FXSelector,void*); 00058 public: 00059 00060 /// Construct a drag corner 00061 FXDragCorner(FXComposite* p); 00062 00063 /// Get default width 00064 virtual FXint getDefaultWidth(); 00065 00066 /// Get default height 00067 virtual FXint getDefaultHeight(); 00068 00069 /// Create all of the server-side resources for this window 00070 virtual void create(); 00071 00072 /// Change highlight color 00073 void setHiliteColor(FXColor clr); 00074 00075 /// Return current highlight color 00076 FXColor getHiliteColor() const { return hiliteColor; } 00077 00078 /// Change shadow color 00079 void setShadowColor(FXColor clr); 00080 00081 /// Return current shadow color 00082 FXColor getShadowColor() const { return shadowColor; } 00083 00084 /// Save drag corner to a stream 00085 virtual void save(FXStream& store) const; 00086 00087 /// Load drag corner from a stream 00088 virtual void load(FXStream& store); 00089 }; 00090 00091 } 00092 00093 #endif
Copyright © 1997-2005 Jeroen van der Zijp |