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.13 2002/01/18 22:42:54 jeroen Exp $                 *
00023 ********************************************************************************/
00024 #ifndef FXSCROLLWINDOW_H
00025 #define FXSCROLLWINDOW_H
00026 
00027 #ifndef FXSCROLLAREA_H
00028 #include "FXScrollArea.h"
00029 #endif
00030 
00031 
00032 
00033 /**
00034 * The scroll window widget scrolls an arbitrary child window.
00035 * Use the scroll window when parts of the user interface itself
00036 * need to be scrolled, for example when applications need to run
00037 * on small screens.
00038 */
00039 class FXAPI FXScrollWindow : public FXScrollArea {
00040   FXDECLARE(FXScrollWindow)
00041 protected:
00042   FXScrollWindow(){}
00043   virtual void layout();
00044 private:
00045   FXScrollWindow(const FXScrollWindow&);
00046   FXScrollWindow &operator=(const FXScrollWindow&);
00047 public:
00048   long onKeyPress(FXObject*,FXSelector,void*);
00049   long onKeyRelease(FXObject*,FXSelector,void*);
00050   long onFocusSelf(FXObject*,FXSelector,void*);
00051 public:
00052 
00053   /// Construct a scroll window
00054   FXScrollWindow(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00055 
00056   /// Return a pointer to the contents window
00057   FXWindow* contentWindow() const;
00058 
00059   /// Return the width of the contents
00060   virtual FXint getContentWidth();
00061 
00062   /// Return the height of the contents
00063   virtual FXint getContentHeight();
00064 
00065   /// Move contents to the specified position
00066   virtual void moveContents(FXint x,FXint y);
00067   };
00068 
00069 
00070 #endif