Fixed crash in heavily loaded multi-threaded systems using simultaneous sorted
[pwlib.git] / include / pwlib / hscrollb.h
blobabd39fd40e9b0f9b9da48ee874662191166943ce
1 /*
2 * hscrollb.h
4 * Horizontal scroll bar control.
6 * Portable Windows Library
8 * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
18 * under the License.
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25 * All Rights Reserved.
27 * Contributor(s): ______________________________________.
29 * $Log$
30 * Revision 1.16 2001/05/22 12:49:33 robertj
31 * Did some seriously wierd rewrite of platform headers to eliminate the
32 * stupid GNU compiler warning about braces not matching.
34 * Revision 1.15 1999/03/10 03:49:51 robertj
35 * More documentation adjustments.
37 * Revision 1.14 1999/03/09 08:01:48 robertj
38 * Changed comments for doc++ support (more to come).
40 * Revision 1.13 1999/02/16 08:08:45 robertj
41 * MSVC 6.0 compatibility changes.
43 * Revision 1.12 1998/09/23 06:23:43 robertj
44 * Added open source copyright license.
46 * Revision 1.11 1994/12/21 11:53:00 robertj
47 * Documentation and variable normalisation.
49 * Revision 1.10 1994/10/30 11:46:38 robertj
50 * Changed mechanism for doing notification callback functions.
52 * Revision 1.9 1994/08/23 11:32:52 robertj
53 * Oops
55 * Revision 1.8 1994/08/22 00:46:48 robertj
56 * Added pragma fro GNU C++ compiler.
58 * Revision 1.7 1994/03/07 07:38:19 robertj
59 * Major enhancementsacross the board.
61 * Revision 1.6 1994/01/15 02:50:29 robertj
62 * Moved control contructors to common and added a platform dependent Construct() function.
64 * Revision 1.5 1994/01/03 04:42:23 robertj
65 * Mass changes to common container classes and interactors etc etc etc.
67 * Revision 1.4 1993/09/27 16:35:25 robertj
68 * Removed special constructor for dialog resource loading.
70 * Revision 1.3 1993/08/21 01:50:33 robertj
71 * Made Clone() function optional, default will assert if called.
73 * Revision 1.2 1993/07/14 12:49:16 robertj
74 * Fixed RCS keywords.
79 #define _PHORIZONTALSCROLLBAR
81 #ifdef __GNUC__
82 #pragma interface
83 #endif
86 /**A horizontal scroll bar control for visually setting an integer value.
88 The exact appearance of a scroll bar is platform dependent. However certain
89 functionality exists for all platforms. These are that the scroll bar allows
90 values between a minimum and maximum to be set via small nudges (typically
91 a up or down arrow), large nudges (typically the page up or down area to
92 either side of the thumb) or by explicitly setting a value (typically by
93 dragging the thumb).
95 class PHorizontalScrollBar : public PScrollBar
97 PCLASSINFO(PHorizontalScrollBar, PScrollBar);
99 public:
100 /** Create a new horizontal scroll bar. */
101 PHorizontalScrollBar(
102 PInteractor * parent, /// Interactor into which the control is placed.
103 PSCROLLBAR_VALUE max = 100, /// Maximum value for scroll bar.
104 PSCROLLBAR_VALUE min = 0, /// Minimum value for scroll bar.
105 PSCROLLBAR_VALUE val = 0, /// Initial value for scroll bar.
106 PSCROLLBAR_VALUE sml = 1, /// Amount to move with the nudge button.
107 PSCROLLBAR_VALUE lge = 10 /// Amount to move with the paging area.
109 PHorizontalScrollBar(
110 PInteractor * parent, /// Interactor into which the control is placed.
111 const PNotifier & func, /// Function to call when changes state.
112 PSCROLLBAR_VALUE max = 100, /// Maximum value for scroll bar.
113 PSCROLLBAR_VALUE min = 0, /// Minimum value for scroll bar.
114 PSCROLLBAR_VALUE val = 0, /// Initial value for scroll bar.
115 PSCROLLBAR_VALUE sml = 1, /// Amount to move with the nudge button.
116 PSCROLLBAR_VALUE lge = 10 /// Amount to move with the paging area.
119 /** Create control from interactor layout with the specified control ID. */
120 PHorizontalScrollBar(
121 PInteractorLayout * parent, /// Interactor into which the box is placed.
122 PRESOURCE_ID ctlID, /// Identifier for the control in the layout.
123 const PNotifier & notify, /// Function to call when changes state.
124 PSCROLLBAR_VALUE * valuePtr /// Variable to change to the scrollbar value.
128 // Include platform dependent part of class
129 #include <pwlib/hscrollb.h>
133 // End Of File ///////////////////////////////////////////////////////////////