![]() |
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,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (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 * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXMenuSeparator.h,v 1.23 2009/01/06 13:07:26 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXMENUSEPARATOR_H 00024 #define FXMENUSEPARATOR_H 00025 00026 #ifndef FXWINDOW_H 00027 #include "FXWindow.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 00033 /** 00034 * The menu separator is a simple decorative groove used to delineate items in a 00035 * popup menu. When a target/message is given, the menu separator is usually 00036 * connected to an instance of the recent files class using the ID_ANYFILES 00037 * message. This automatically hides the menu separator when no files are listed 00038 * in the recent files section. Another possible target is the MDI client using 00039 * the ID_MDI_ANY message: in this case, the menu separator will be automatically 00040 * hidden when no MDI child windows are present. 00041 */ 00042 class FXAPI FXMenuSeparator : public FXWindow { 00043 FXDECLARE(FXMenuSeparator) 00044 protected: 00045 FXColor hiliteColor; 00046 FXColor shadowColor; 00047 protected: 00048 FXMenuSeparator(); 00049 private: 00050 FXMenuSeparator(const FXMenuSeparator&); 00051 FXMenuSeparator &operator=(const FXMenuSeparator&); 00052 public: 00053 long onPaint(FXObject*,FXSelector,void*); 00054 public: 00055 00056 /// Construct a menu separator 00057 FXMenuSeparator(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0); 00058 00059 /// Return default width 00060 virtual FXint getDefaultWidth(); 00061 00062 /// Return default height 00063 virtual FXint getDefaultHeight(); 00064 00065 /// Change highlight color 00066 void setHiliteColor(FXColor clr); 00067 00068 /// Get highlight color 00069 FXColor getHiliteColor() const { return hiliteColor; } 00070 00071 /// Change shadow color 00072 void setShadowColor(FXColor clr); 00073 00074 /// Get shadow color 00075 FXColor getShadowColor() const { return shadowColor; } 00076 00077 /// Save menu to a stream 00078 virtual void save(FXStream& store) const; 00079 00080 /// Load menu from a stream 00081 virtual void load(FXStream& store); 00082 }; 00083 00084 } 00085 00086 #endif
![]() |