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,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: FXMenuSeparator.h,v 1.17 2006/01/22 17:58:06 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXMENUSEPARATOR_H 00025 #define FXMENUSEPARATOR_H 00026 00027 #ifndef FXWINDOW_H 00028 #include "FXWindow.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 /** 00035 * The menu separator is a simple decorative groove 00036 * used to delineate items in a popup menu. 00037 */ 00038 class FXAPI FXMenuSeparator : public FXWindow { 00039 FXDECLARE(FXMenuSeparator) 00040 protected: 00041 FXColor hiliteColor; 00042 FXColor shadowColor; 00043 protected: 00044 FXMenuSeparator(); 00045 private: 00046 FXMenuSeparator(const FXMenuSeparator&); 00047 FXMenuSeparator &operator=(const FXMenuSeparator&); 00048 public: 00049 long onPaint(FXObject*,FXSelector,void*); 00050 public: 00051 00052 /// Construct a menu separator 00053 FXMenuSeparator(FXComposite* p,FXuint opts=0); 00054 00055 /// Return default width 00056 virtual FXint getDefaultWidth(); 00057 00058 /// Return default height 00059 virtual FXint getDefaultHeight(); 00060 00061 /// Change highlight color 00062 void setHiliteColor(FXColor clr); 00063 00064 /// Get highlight color 00065 FXColor getHiliteColor() const { return hiliteColor; } 00066 00067 /// Change shadow color 00068 void setShadowColor(FXColor clr); 00069 00070 /// Get shadow color 00071 FXColor getShadowColor() const { return shadowColor; } 00072 00073 /// Save menu to a stream 00074 virtual void save(FXStream& store) const; 00075 00076 /// Load menu from a stream 00077 virtual void load(FXStream& store); 00078 }; 00079 00080 } 00081 00082 #endif
Copyright © 1997-2005 Jeroen van der Zijp |