|
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
|
00001 /********************************************************************************
00002 * *
00003 * Pane close widget *
00004 * *
00005 *********************************************************************************
00006 * Copyright (C) 2003 by Mathew Robertson. 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 #ifndef FXPANEHEADER_H
00023 #define FXPANEHEADER_H
00024
00025 #ifndef FXHORIZONTALFRAME_H
00026 #include <fox/FXHorizontalFrame.h>
00027 using namespace FX;
00028 #endif
00029 namespace FXEX {
00030
00031 /**
00032 * The is a simple header for window frames (like an FXVerticalFrame).
00033 * As is, it can be used to close a pane, though normally you would specify your parent pane.
00034 */
00035 class FXAPI FXPaneHeader : public FXHorizontalFrame {
00036 FXDECLARE(FXPaneHeader)
00037
00038 protected:
00039 FXLabel *textLabel;
00040 FXButton *closeButton;
00041
00042 protected:
00043 FXPaneHeader();
00044
00045 private:
00046 FXPaneHeader(const FXPaneHeader&);
00047 FXPaneHeader &operator=(const FXPaneHeader&);
00048
00049 public:
00050 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00051 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00052
00053 public:
00054 /// Make new pane header
00055 FXPaneHeader(FXComposite* p,const FXString& lbl,FXIcon* icon=NULL,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=LAYOUT_FILL_X|FRAME_RAISED|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=1,FXint pb=1);
00056
00057 /// Change item's text label
00058 void setText(const FXString& lbl);
00059
00060 /// Return item's text label
00061 FXString getText() const;
00062
00063 /// Save to a stream
00064 virtual void save(FXStream& store) const;
00065
00066 /// Load from a stream
00067 virtual void load(FXStream& store);
00068
00069 /// goodbye
00070 virtual ~FXPaneHeader();
00071 };
00072
00073 } // namespace FXEX
00074 #endif // FXPANEHEADER_H