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,2005 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.16 2005/01/16 16:06: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 {
39   FXDECLARE(FXMenuSeparator)
40 protected:
41   FXColor hiliteColor;
42   FXColor shadowColor;
43 protected:
44   FXMenuSeparator();
45 private:
46   FXMenuSeparator(const FXMenuSeparator&);
47   FXMenuSeparator &operator=(const FXMenuSeparator&);
48 public:
49   long onPaint(FXObject*,FXSelector,void*);
50 public:
51 
52   /// Construct a menu separator
53   FXMenuSeparator(FXComposite* p,FXuint opts=0);
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
getHiliteColor()65   FXColor getHiliteColor() const { return hiliteColor; }
66 
67   /// Change shadow color
68   void setShadowColor(FXColor clr);
69 
70   /// Get shadow color
getShadowColor()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
83