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

FXSeparator.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      S e p a r a t o r   W i d g e t s                        *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1998,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: FXSeparator.h,v 1.18 2006/01/22 17:58:09 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FXSEPARATOR_H
00025 #define FXSEPARATOR_H
00026 
00027 #ifndef FXFRAME_H
00028 #include "FXFrame.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00034 /// Separator Options
00035 enum {
00036   SEPARATOR_NONE       = 0,               /// Nothing visible
00037   SEPARATOR_GROOVE     = 0x00008000,      /// Etched-in looking groove
00038   SEPARATOR_RIDGE      = 0x00010000,      /// Embossed looking ridge
00039   SEPARATOR_LINE       = 0x00020000       /// Simple line
00040   };
00041 
00042 
00043 /**
00044 * A Separator widget is used to draw a horizontal or vertical divider between
00045 * groups of controls.  It is purely decorative.  The separator may be drawn
00046 * in various styles as determined by the SEPARATOR_NONE, SEPARATOR_GROOVE,
00047 * SEPARATOR_RIDGE, and SEPARATOR_LINE options.  Since its derived from Frame,
00048 * it can also have the frame's border styles.
00049 */
00050 class FXAPI FXSeparator : public FXFrame {
00051   FXDECLARE(FXSeparator)
00052 protected:
00053   FXSeparator(){}
00054 private:
00055   FXSeparator(const FXSeparator&);
00056   FXSeparator &operator=(const FXSeparator&);
00057 public:
00058   long onPaint(FXObject*,FXSelector,void*);
00059 public:
00060 
00061   /// Constructor
00062   FXSeparator(FXComposite* p,FXuint opts=SEPARATOR_GROOVE|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0);
00063 
00064   /// Return default width
00065   virtual FXint getDefaultWidth();
00066 
00067   /// Return default height
00068   virtual FXint getDefaultHeight();
00069 
00070   /// Change separator style
00071   void setSeparatorStyle(FXuint style);
00072 
00073   /// Get separator style
00074   FXuint getSeparatorStyle() const;
00075   };
00076 
00077 
00078 
00079 /// Horizontal separator widget
00080 class FXAPI FXHorizontalSeparator : public FXSeparator {
00081   FXDECLARE(FXHorizontalSeparator)
00082 protected:
00083   FXHorizontalSeparator(){}
00084 private:
00085   FXHorizontalSeparator(const FXHorizontalSeparator&);
00086   FXHorizontalSeparator &operator=(const FXHorizontalSeparator&);
00087 public:
00088 
00089   /// Constructor
00090   FXHorizontalSeparator(FXComposite* p,FXuint opts=SEPARATOR_GROOVE|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=1,FXint pr=1,FXint pt=0,FXint pb=0);
00091   };
00092 
00093 
00094 
00095 /// Vertical separator widget
00096 class FXAPI FXVerticalSeparator : public FXSeparator {
00097   FXDECLARE(FXVerticalSeparator)
00098 protected:
00099   FXVerticalSeparator(){}
00100 private:
00101   FXVerticalSeparator(const FXVerticalSeparator&);
00102   FXVerticalSeparator &operator=(const FXVerticalSeparator&);
00103 public:
00104 
00105   /// Constructor
00106   FXVerticalSeparator(FXComposite* p,FXuint opts=SEPARATOR_GROOVE|LAYOUT_FILL_Y,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=1,FXint pb=1);
00107   };
00108 
00109 }
00110 
00111 #endif

Copyright © 1997-2005 Jeroen van der Zijp