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

FXMenuSeparator.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * M e n u S e p a r a t o 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: FXMenuSeparator.h,v 1.17 2006/01/22 17:58:06 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXMENUSEPARATOR_H
25 #define FXMENUSEPARATOR_H
26 
27 #ifndef FXWINDOW_H
28 #include "FXWindow.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * The menu separator is a simple decorative groove
36 * used to delineate items in a popup menu.
37 */
38 class FXAPI FXMenuSeparator : public FXWindow {
40 protected:
41  FXColor hiliteColor;
42  FXColor shadowColor;
43 protected:
45 private:
47  FXMenuSeparator &operator=(const FXMenuSeparator&);
48 public:
49  long onPaint(FXObject*,FXSelector,void*);
50 public:
51 
52  /// Construct a menu separator
54 
55  /// Return default width
56  virtual FXint getDefaultWidth();
57 
58  /// Return default height
59  virtual FXint getDefaultHeight();
60 
61  /// Change highlight color
62  void setHiliteColor(FXColor clr);
63 
64  /// Get highlight color
65  FXColor getHiliteColor() const { return hiliteColor; }
66 
67  /// Change shadow color
68  void setShadowColor(FXColor clr);
69 
70  /// Get shadow color
71  FXColor getShadowColor() const { return shadowColor; }
72 
73  /// Save menu to a stream
74  virtual void save(FXStream& store) const;
75 
76  /// Load menu from a stream
77  virtual void load(FXStream& store);
78  };
79 
80 }
81 
82 #endif
Base class for all windows.
Definition: FXWindow.h:115
unsigned int FXuint
Definition: fxdefs.h:389
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
Base composite.
Definition: FXComposite.h:35
The menu separator is a simple decorative groove used to delineate items in a popup menu...
Definition: FXMenuSeparator.h:38
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