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

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,2004 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.6 2004/02/08 17:17:34 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXSCROLLPANE_H 00025 #define FXSCROLLPANE_H 00026 00027 #ifndef FXMENUPANE_H 00028 #include "FXMenuPane.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 class FXArrowButton; 00034 00035 /// Scrolling menu pane 00036 class FXAPI FXScrollPane : public FXMenuPane { 00037 FXDECLARE(FXScrollPane) 00038 protected: 00039 FXArrowButton *dn; // Button to scroll down 00040 FXArrowButton *up; // Button to scroll up 00041 FXint visible; // Visible entries 00042 FXint top; // Top visible entry 00043 protected: 00044 FXScrollPane(); 00045 private: 00046 FXScrollPane(const FXScrollPane&); 00047 FXScrollPane &operator=(const FXScrollPane&); 00048 public: 00049 long onUpdIncrement(FXObject*,FXSelector,void*); 00050 long onCmdIncrement(FXObject*,FXSelector,void*); 00051 long onUpdDecrement(FXObject*,FXSelector,void*); 00052 long onCmdDecrement(FXObject*,FXSelector,void*); 00053 public: 00054 enum { 00055 ID_SCROLL_DN=FXMenuPane::ID_LAST, 00056 ID_SCROLL_UP, 00057 ID_LAST 00058 }; 00059 public: 00060 00061 /// Construct menu pane 00062 FXScrollPane(FXWindow* owner,FXint nvis,FXuint opts=0); 00063 00064 /// Return the default width of this window 00065 virtual FXint getDefaultWidth(); 00066 00067 /// Return the default height of this window 00068 virtual FXint getDefaultHeight(); 00069 00070 /// Show this window 00071 virtual void show(); 00072 00073 /// Perform layout 00074 virtual void layout(); 00075 00076 /// Get index of top most menu item 00077 FXint getTopItem() const { return top; } 00078 00079 /// Scroll item to top 00080 void setTopItem(FXint t); 00081 00082 /// Destroy 00083 virtual ~FXScrollPane(); 00084 }; 00085 00086 } 00087 00088 #endif

Copyright © 1997-2004 Jeroen van der Zijp