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

Copyright © 1997-2009 Jeroen van der Zijp