Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXDragCorner.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * D r a g C o r n e r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXDragCorner.h,v 1.15 2006/01/22 17:58:01 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXDRAGCORNER_H
25 #define FXDRAGCORNER_H
26 
27 #ifndef FXWINDOW_H
28 #include "FXWindow.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * A drag corner widget may be placed in the bottom right corner
36 * so as to allow the window to be resized more easily.
37 */
38 class FXAPI FXDragCorner : public FXWindow {
40 protected:
41  FXColor hiliteColor;
42  FXColor shadowColor;
43  FXint oldw;
44  FXint oldh;
45  FXint xoff;
46  FXint yoff;
47  FXbool ewmh;
48 protected:
49  FXDragCorner();
50 private:
51  FXDragCorner(const FXDragCorner&);
52  FXDragCorner &operator=(const FXDragCorner&);
53 public:
54  long onPaint(FXObject*,FXSelector,void*);
55  long onLeftBtnPress(FXObject*,FXSelector,void*);
56  long onLeftBtnRelease(FXObject*,FXSelector,void*);
57  long onMotion(FXObject*,FXSelector,void*);
58 public:
59 
60  /// Construct a drag corner
62 
63  /// Get default width
64  virtual FXint getDefaultWidth();
65 
66  /// Get default height
67  virtual FXint getDefaultHeight();
68 
69  /// Create all of the server-side resources for this window
70  virtual void create();
71 
72  /// Change highlight color
73  void setHiliteColor(FXColor clr);
74 
75  /// Return current highlight color
76  FXColor getHiliteColor() const { return hiliteColor; }
77 
78  /// Change shadow color
79  void setShadowColor(FXColor clr);
80 
81  /// Return current shadow color
82  FXColor getShadowColor() const { return shadowColor; }
83 
84  /// Save drag corner to a stream
85  virtual void save(FXStream& store) const;
86 
87  /// Load drag corner from a stream
88  virtual void load(FXStream& store);
89  };
90 
91 }
92 
93 #endif
A drag corner widget may be placed in the bottom right corner so as to allow the window to be resized...
Definition: FXDragCorner.h:38
Base class for all windows.
Definition: FXWindow.h:115
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
FXuchar FXbool
Definition: fxdefs.h:386
Base composite.
Definition: FXComposite.h:35
FXuint FXColor
Definition: fxdefs.h:447
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp