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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXScrollPane.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *               S c r o l l i n g   M e n u   P a n e   W i d g e t             *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 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 #ifndef FXSCROLLPANE_H
00022 #define FXSCROLLPANE_H
00023 
00024 #ifndef FXMENUPANE_H
00025 #include "FXMenuPane.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 class FXArrowButton;
00031 
00037 class FXAPI FXScrollPane : public FXMenuPane {
00038   FXDECLARE(FXScrollPane)
00039 protected:
00040   FXArrowButton *dn;            // Button to scroll down
00041   FXArrowButton *up;            // Button to scroll up
00042   FXint          visible;       // Visible entries
00043   FXint          top;           // Top visible entry
00044 protected:
00045   FXScrollPane();
00046 private:
00047   FXScrollPane(const FXScrollPane&);
00048   FXScrollPane &operator=(const FXScrollPane&);
00049 public:
00050   long onCmdIncrement(FXObject*,FXSelector,void*);
00051   long onCmdDecrement(FXObject*,FXSelector,void*);
00052 public:
00053   enum {
00054     ID_SCROLL_DN=FXMenuPane::ID_LAST,
00055     ID_SCROLL_UP,
00056     ID_LAST
00057     };
00058 public:
00059 
00061   FXScrollPane(FXWindow* owner,FXint nvis,FXuint opts=0);
00062 
00064   virtual FXint getDefaultWidth();
00065 
00067   virtual FXint getDefaultHeight();
00068 
00070   virtual void show();
00071 
00073   virtual void layout();
00074 
00076   FXint getNumVisible() const { return visible; }
00077 
00079   void setNumVisible(FXint nvis);
00080 
00082   FXint getTopItem() const { return top; }
00083 
00085   void setTopItem(FXint t);
00086 
00088   virtual ~FXScrollPane();
00089   };
00090 
00091 }
00092 
00093 #endif

Copyright © 1997-2011 Jeroen van der Zijp