X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..e0effd7e3b8ad53abdcd008da75ba49a4af1ebf2:/interface/wx/slider.h diff --git a/interface/wx/slider.h b/interface/wx/slider.h index 2e1bec435d..3a1bae6acf 100644 --- a/interface/wx/slider.h +++ b/interface/wx/slider.h @@ -2,10 +2,26 @@ // Name: slider.h // Purpose: interface of wxSlider // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +#define wxSL_HORIZONTAL wxHORIZONTAL /* 0x0004 */ +#define wxSL_VERTICAL wxVERTICAL /* 0x0008 */ + +#define wxSL_TICKS 0x0010 +#define wxSL_AUTOTICKS wxSL_TICKS // we don't support manual ticks +#define wxSL_LEFT 0x0040 +#define wxSL_TOP 0x0080 +#define wxSL_RIGHT 0x0100 +#define wxSL_BOTTOM 0x0200 +#define wxSL_BOTH 0x0400 +#define wxSL_SELRANGE 0x0800 +#define wxSL_INVERSE 0x1000 +#define wxSL_MIN_MAX_LABELS 0x2000 +#define wxSL_VALUE_LABEL 0x4000 +#define wxSL_LABELS (wxSL_MIN_MAX_LABELS|wxSL_VALUE_LABEL) + /** @class wxSlider @@ -41,7 +57,7 @@ @style{wxSL_SELRANGE} Allows the user to select a range on the slider. Windows only. @style{wxSL_INVERSE} - Inverses the mininum and maximum endpoints on the slider. Not + Inverses the minimum and maximum endpoints on the slider. Not compatible with wxSL_SELRANGE. @endStyleTable @@ -60,45 +76,48 @@ @event{EVT_SCROLL(func)} Process all scroll events. @event{EVT_SCROLL_TOP(func)} - Process wxEVT_SCROLL_TOP scroll-to-top events (minimum position). + Process @c wxEVT_SCROLL_TOP scroll-to-top events (minimum position). @event{EVT_SCROLL_BOTTOM(func)} - Process wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). + Process @c wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). @event{EVT_SCROLL_LINEUP(func)} - Process wxEVT_SCROLL_LINEUP line up events. + Process @c wxEVT_SCROLL_LINEUP line up events. @event{EVT_SCROLL_LINEDOWN(func)} - Process wxEVT_SCROLL_LINEDOWN line down events. + Process @c wxEVT_SCROLL_LINEDOWN line down events. @event{EVT_SCROLL_PAGEUP(func)} - Process wxEVT_SCROLL_PAGEUP page up events. + Process @c wxEVT_SCROLL_PAGEUP page up events. @event{EVT_SCROLL_PAGEDOWN(func)} - Process wxEVT_SCROLL_PAGEDOWN page down events. + Process @c wxEVT_SCROLL_PAGEDOWN page down events. @event{EVT_SCROLL_THUMBTRACK(func)} - Process wxEVT_SCROLL_THUMBTRACK thumbtrack events + Process @c wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack). @event{EVT_SCROLL_THUMBRELEASE(func)} - Process wxEVT_SCROLL_THUMBRELEASE thumb release events. + Process @c wxEVT_SCROLL_THUMBRELEASE thumb release events. @event{EVT_SCROLL_CHANGED(func)} - Process wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). + Process @c wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). @event{EVT_COMMAND_SCROLL(id, func)} Process all scroll events. @event{EVT_COMMAND_SCROLL_TOP(id, func)} - Process wxEVT_SCROLL_TOP scroll-to-top events (minimum position). + Process @c wxEVT_SCROLL_TOP scroll-to-top events (minimum position). @event{EVT_COMMAND_SCROLL_BOTTOM(id, func)} - Process wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). + Process @c wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position). @event{EVT_COMMAND_SCROLL_LINEUP(id, func)} - Process wxEVT_SCROLL_LINEUP line up events. + Process @c wxEVT_SCROLL_LINEUP line up events. @event{EVT_COMMAND_SCROLL_LINEDOWN(id, func)} - Process wxEVT_SCROLL_LINEDOWN line down events. + Process @c wxEVT_SCROLL_LINEDOWN line down events. @event{EVT_COMMAND_SCROLL_PAGEUP(id, func)} - Process wxEVT_SCROLL_PAGEUP page up events. + Process @c wxEVT_SCROLL_PAGEUP page up events. @event{EVT_COMMAND_SCROLL_PAGEDOWN(id, func)} - Process wxEVT_SCROLL_PAGEDOWN page down events. + Process @c wxEVT_SCROLL_PAGEDOWN page down events. @event{EVT_COMMAND_SCROLL_THUMBTRACK(id, func)} - Process wxEVT_SCROLL_THUMBTRACK thumbtrack events + Process @c wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack). @event{EVT_COMMAND_SCROLL_THUMBRELEASE(func)} - Process wxEVT_SCROLL_THUMBRELEASE thumb release events. + Process @c wxEVT_SCROLL_THUMBRELEASE thumb release events. @event{EVT_COMMAND_SCROLL_CHANGED(func)} - Process wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). + Process @c wxEVT_SCROLL_CHANGED end of scrolling events (MSW only). + @event{EVT_SLIDER(id, func)} + Process @c wxEVT_SLIDER which is generated after any + change of wxSlider position in addition to one of the events above. @endEventTable @section slider_diff The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED @@ -117,7 +136,7 @@ @library{wxcore} @category{ctrl} - @appearance{slider.png} + @appearance{slider} @see @ref overview_events, wxScrollBar */ @@ -276,6 +295,27 @@ public: */ virtual void SetLineSize(int lineSize); + + /** + Sets the minimum slider value. + + @param minValue + The new bottom end of the slider range. + + @see GetMin(), SetRange() + */ + void SetMin( int minValue ); + + /** + Sets the maximum slider value. + + @param maxValue + The new top end of the slider range. + + @see GetMax(), SetRange() + */ + void SetMax( int maxValue ); + /** Sets the page size for the slider. @@ -337,14 +377,12 @@ public: @param n Frequency. For example, if the frequency is set to two, a tick mark is displayed for every other increment in the slider's range. - @param pos - Position. Must be greater than zero. @todo: what is this for? @onlyfor{wxmsw} @see GetTickFreq() */ - virtual void SetTickFreq(int n, int pos); + virtual void SetTickFreq(int n); /** Sets the slider position.