FXScrollPane.h

Go to the documentation of this file.
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,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: FXScrollPane.h,v 1.10 2006/01/22 17:58:09 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FX_DISABLEMENUS
00025 
00026 #ifndef FXSCROLLPANE_H
00027 #define FXSCROLLPANE_H
00028 
00029 #ifndef FXMENUPANE_H
00030 #include "FXMenuPane.h"
00031 #endif
00032 
00033 namespace FX {
00034 
00035 class FXArrowButton;
00036 
00042 class FXAPI FXScrollPane : public FXMenuPane {
00043   FXDECLARE(FXScrollPane)
00044 protected:
00045   FXArrowButton *dn;            // Button to scroll down
00046   FXArrowButton *up;            // Button to scroll up
00047   FXint          visible;       // Visible entries
00048   FXint          top;           // Top visible entry
00049 protected:
00050   FXScrollPane();
00051 private:
00052   FXScrollPane(const FXScrollPane&);
00053   FXScrollPane &operator=(const FXScrollPane&);
00054 public:
00055   long onCmdIncrement(FXObject*,FXSelector,void*);
00056   long onCmdDecrement(FXObject*,FXSelector,void*);
00057 public:
00058   enum {
00059     ID_SCROLL_DN=FXMenuPane::ID_LAST,
00060     ID_SCROLL_UP,
00061     ID_LAST
00062     };
00063 public:
00064 
00066   FXScrollPane(FXWindow* owner,FXint nvis,FXuint opts=0);
00067 
00069   virtual FXint getDefaultWidth();
00070 
00072   virtual FXint getDefaultHeight();
00073 
00075   virtual void show();
00076 
00078   virtual void layout();
00079 
00081   FXint getNumVisible() const { return visible; }
00082 
00084   void setNumVisible(FXint nvis);
00085 
00087   FXint getTopItem() const { return top; }
00088 
00090   void setTopItem(FXint t);
00091 
00093   virtual ~FXScrollPane();
00094   };
00095 
00096 }
00097 
00098 #endif
00099 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:24 2009 for TnFOX by doxygen v1.4.7