1 /******************************************************************************** 2 * * 3 * S e p a r a t o r W i d g e t s * 4 * * 5 ********************************************************************************* 6 * Copyright (C) 1998,2020 by Jeroen van der Zijp. All Rights Reserved. * 7 ********************************************************************************* 8 * This library is free software; you can redistribute it and/or modify * 9 * it under the terms of the GNU Lesser General Public License as published by * 10 * the Free Software Foundation; either version 3 of the License, or * 11 * (at your option) any later version. * 12 * * 13 * This library is distributed in the hope that it will be useful, * 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 * GNU Lesser General Public License for more details. * 17 * * 18 * You should have received a copy of the GNU Lesser General Public License * 19 * along with this program. If not, see <http://www.gnu.org/licenses/> * 20 ********************************************************************************/ 21 #ifndef FXSEPARATOR_H 22 #define FXSEPARATOR_H 23 24 #ifndef FXFRAME_H 25 #include "FXFrame.h" 26 #endif 27 28 namespace FX { 29 30 31 /// Separator Options 32 enum { 33 SEPARATOR_NONE = 0, /// Nothing visible 34 SEPARATOR_GROOVE = 0x00008000, /// Etched-in looking groove 35 SEPARATOR_RIDGE = 0x00010000, /// Embossed looking ridge 36 SEPARATOR_LINE = 0x00020000 /// Simple line 37 }; 38 39 40 /** 41 * A Separator widget is used to draw a horizontal or vertical divider between 42 * groups of controls. It is purely decorative. The separator may be drawn 43 * in various styles as determined by the SEPARATOR_NONE, SEPARATOR_GROOVE, 44 * SEPARATOR_RIDGE, and SEPARATOR_LINE options. Since its derived from Frame, 45 * it can also have the frame's border styles. 46 */ 47 class FXAPI FXSeparator : public FXFrame { FXDECLARE(FXSeparator)48 FXDECLARE(FXSeparator) 49 protected: 50 FXSeparator(){} 51 private: 52 FXSeparator(const FXSeparator&); 53 FXSeparator &operator=(const FXSeparator&); 54 public: 55 long onPaint(FXObject*,FXSelector,void*); 56 public: 57 58 /// Constructor 59 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); 60 61 /// Return default width 62 virtual FXint getDefaultWidth(); 63 64 /// Return default height 65 virtual FXint getDefaultHeight(); 66 67 /// Change separator style 68 void setSeparatorStyle(FXuint style); 69 70 /// Get separator style 71 FXuint getSeparatorStyle() const; 72 }; 73 74 75 76 /// Horizontal separator widget 77 class FXAPI FXHorizontalSeparator : public FXSeparator { FXDECLARE(FXHorizontalSeparator)78 FXDECLARE(FXHorizontalSeparator) 79 protected: 80 FXHorizontalSeparator(){} 81 private: 82 FXHorizontalSeparator(const FXHorizontalSeparator&); 83 FXHorizontalSeparator &operator=(const FXHorizontalSeparator&); 84 public: 85 86 /// Constructor 87 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); 88 }; 89 90 91 92 /// Vertical separator widget 93 class FXAPI FXVerticalSeparator : public FXSeparator { FXDECLARE(FXVerticalSeparator)94 FXDECLARE(FXVerticalSeparator) 95 protected: 96 FXVerticalSeparator(){} 97 private: 98 FXVerticalSeparator(const FXVerticalSeparator&); 99 FXVerticalSeparator &operator=(const FXVerticalSeparator&); 100 public: 101 102 /// Constructor 103 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); 104 }; 105 106 } 107 108 #endif 109