![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * M e n u S e p a r a t o 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: FXMenuSeparator.h,v 1.11 2002/01/18 22:55:03 jeroen Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXMENUSEPARATOR_H 00025 #define FXMENUSEPARATOR_H 00026 00027 #ifndef FXWINDOW_H 00028 #include "FXWindow.h" 00029 #endif 00030 00031 00032 00033 /** 00034 * The menu separator is a simple decorative groove 00035 * used to delineate items in a popup menu. 00036 */ 00037 class FXAPI FXMenuSeparator : public FXWindow { 00038 FXDECLARE(FXMenuSeparator) 00039 protected: 00040 FXColor hiliteColor; 00041 FXColor shadowColor; 00042 protected: 00043 FXMenuSeparator(); 00044 private: 00045 FXMenuSeparator(const FXMenuSeparator&); 00046 FXMenuSeparator &operator=(const FXMenuSeparator&); 00047 public: 00048 long onPaint(FXObject*,FXSelector,void*); 00049 public: 00050 00051 /// Construct a menu separator 00052 FXMenuSeparator(FXComposite* p,FXuint opts=0); 00053 00054 /// Return default width 00055 virtual FXint getDefaultWidth(); 00056 00057 /// Return default height 00058 virtual FXint getDefaultHeight(); 00059 00060 /// Change highlight color 00061 void setHiliteColor(FXColor clr); 00062 00063 /// Get highlight color 00064 FXColor getHiliteColor() const { return hiliteColor; } 00065 00066 /// Change shadow color 00067 void setShadowColor(FXColor clr); 00068 00069 /// Get shadow color 00070 FXColor getShadowColor() const { return shadowColor; } 00071 00072 /// Save menu to a stream 00073 virtual void save(FXStream& store) const; 00074 00075 /// Load menu from a stream 00076 virtual void load(FXStream& store); 00077 }; 00078 00079 00080 #endif