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

FXScrollWindow.h

00001 /********************************************************************************
00002 *                                                                               *
00003 *                     S c r o l l W i n d o w   W i d g e t                     *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2002 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: FXScrollWindow.h,v 1.15 2002/03/12 07:11:30 fox Exp $                    *
00023 ********************************************************************************/
00024 #ifndef FXSCROLLWINDOW_H
00025 #define FXSCROLLWINDOW_H
00026 
00027 #ifndef FXSCROLLAREA_H
00028 #include "FXScrollArea.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00034 /**
00035 * The scroll window widget scrolls an arbitrary child window.
00036 * Use the scroll window when parts of the user interface itself
00037 * need to be scrolled, for example when applications need to run
00038 * on small screens.
00039 */
00040 class FXAPI FXScrollWindow : public FXScrollArea {
00041   FXDECLARE(FXScrollWindow)
00042 protected:
00043   FXScrollWindow(){}
00044   virtual void layout();
00045 private:
00046   FXScrollWindow(const FXScrollWindow&);
00047   FXScrollWindow &operator=(const FXScrollWindow&);
00048 public:
00049   long onKeyPress(FXObject*,FXSelector,void*);
00050   long onKeyRelease(FXObject*,FXSelector,void*);
00051   long onFocusSelf(FXObject*,FXSelector,void*);
00052 public:
00053 
00054   /// Construct a scroll window
00055   FXScrollWindow(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00056 
00057   /// Return a pointer to the contents window
00058   FXWindow* contentWindow() const;
00059 
00060   /// Return the width of the contents
00061   virtual FXint getContentWidth();
00062 
00063   /// Return the height of the contents
00064   virtual FXint getContentHeight();
00065 
00066   /// Move contents to the specified position
00067   virtual void moveContents(FXint x,FXint y);
00068   };
00069 
00070 }
00071 
00072 #endif