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

FXScrollPane.h
1 /********************************************************************************
2 * *
3 * S c r o l l i n g M e n u P a n e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2022 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXSCROLLPANE_H
22 #define FXSCROLLPANE_H
23 
24 #ifndef FXMENUPANE_H
25 #include "FXMenuPane.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXArrowButton;
32 
33 
39 class FXAPI FXScrollPane : public FXMenuPane {
40  FXDECLARE(FXScrollPane)
41 protected:
42  FXArrowButton *dn; // Button to scroll down
43  FXArrowButton *up; // Button to scroll up
44  FXint visible; // Visible entries
45  FXint top; // Top visible entry
46 protected:
47  FXScrollPane();
48 private:
49  FXScrollPane(const FXScrollPane&);
50  FXScrollPane &operator=(const FXScrollPane&);
51 public:
52  long onCmdIncrement(FXObject*,FXSelector,void*);
53  long onCmdDecrement(FXObject*,FXSelector,void*);
54 public:
55  enum {
56  ID_SCROLL_DN=FXMenuPane::ID_LAST,
57  ID_SCROLL_UP,
58  ID_LAST
59  };
60 public:
61 
63  FXScrollPane(FXWindow* owner,FXint nvis,FXuint opts=0);
64 
66  virtual FXint getDefaultWidth();
67 
69  virtual FXint getDefaultHeight();
70 
72  virtual void show();
73 
75  virtual void layout();
76 
78  FXint getNumVisible() const { return visible; }
79 
81  void setNumVisible(FXint nvis);
82 
84  FXint getTopItem() const { return top; }
85 
87  void setTopItem(FXint t);
88 
90  virtual ~FXScrollPane();
91  };
92 
93 }
94 
95 #endif
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
FXint getTopItem() const
Get index of top most menu item.
Definition: FXScrollPane.h:84
Definition: FX4Splitter.h:28
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
A Scroll Pane is a menu pane which provides scrolling of menu entries.
Definition: FXScrollPane.h:39
FXint getNumVisible() const
Return number of visible items.
Definition: FXScrollPane.h:78
Popup menu pane.
Definition: FXMenuPane.h:32
Button with an arrow; the arrow can point in any direction.
Definition: FXArrowButton.h:55

Copyright © 1997-2022 Jeroen van der Zijp