<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxScrollBar</title>
</header>
<module>wxScrollBar</module>
<modulesummary>Functions for wxScrollBar class</modulesummary>
<description><p>A <seeerl marker="wxScrollBar"><c>wxScrollBar</c></seeerl> is a control that represents a horizontal or vertical scrollbar.
      </p><p>It is distinct from the two scrollbars that some windows provide automatically, but the two types of scrollbar share the way events are received.
      </p><p>Remark: A scrollbar has the following main attributes: range, thumb size, page size, and position. The range is the total number of units associated with the view represented by the scrollbar. For a table with 15 columns, the range would be 15. The thumb size is the number of units that are currently visible. For the table example, the window might be sized so that only 5 columns are currently visible, in which case the application would set the thumb size to 5. When the thumb size becomes the same as or greater than the range, the scrollbar will be automatically hidden on most platforms. The page size is the number of units that the scrollbar should scroll by, when 'paging' through the data. This value is normally the same as the thumb size length, because it is natural to assume that the visible window size defines a page. The scrollbar position is the current thumb position. Most applications will find it convenient to provide a function called AdjustScrollbars() which can be called initially, from an OnSize event handler, and whenever the application data changes in size. It will adjust the view, object and page size according to the size of the window and the size of the data.
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED</p> <p>The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event).
      </p> <p>The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen).
      </p> <p>In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/moving has finished independently of the way it had started. Please see the page_samples_widgets ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.
      </p> <p>See: <url href="https://docs.wxwidgets.org/3.1/overview_scrolling.html#overview_scrolling">Overview scrolling</url>, <url href="https://docs.wxwidgets.org/3.1/overview_events.html#overview_events">Overview events</url>, <c>wxScrolled</c> (not implemented in wx)
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxControl"><c>wxControl</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_scroll_bar.html">wxScrollBar</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxScrollEvent"><c>scroll_top</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_bottom</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_lineup</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_linedown</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_pageup</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_pagedown</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_thumbtrack</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_thumbrelease</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_changed</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_top</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_bottom</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_lineup</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_linedown</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_pageup</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_pagedown</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_thumbtrack</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_thumbrelease</c></seeerl>, <seeerl marker="wxScrollEvent"><c>scroll_changed</c></seeerl></p></section>
<datatypes><datatype><name name="wxScrollBar"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>new/3</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Constructor, creating and showing a scrollbar. </fsummary>
    <desc><p>Constructor, creating and showing a scrollbar. 
      </p><p>See: <seemfa marker="#create/4"><c>create/4</c></seemfa>, <c>wxValidator</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the scrollbar. </fsummary>
    <desc><p>Destructor, destroying the scrollbar. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>create/4</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>Scrollbar creation function called by the scrollbar constructor. </fsummary>
    <desc><p>Scrollbar creation function called by the scrollbar constructor. 
      </p><p>See <seemfa marker="#new/3"><c>new/3</c></seemfa> for details. 
      </p></desc>
  </func>
  
  <func>
    <name name="getRange" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the length of the scrollbar. </fsummary>
    <desc><p>Returns the length of the scrollbar. 
      </p><p>See: <seemfa marker="#setScrollbar/6"><c>setScrollbar/6</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getPageSize" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the page size of the scrollbar. </fsummary>
    <desc><p>Returns the page size of the scrollbar. 
      </p><p>This is the number of scroll units that will be scrolled when the user pages up or down. Often it is the same as the thumb size.
      </p><p>See: <seemfa marker="#setScrollbar/6"><c>setScrollbar/6</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getThumbPosition" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the current position of the scrollbar thumb. </fsummary>
    <desc><p>Returns the current position of the scrollbar thumb. 
      </p><p>See: <seemfa marker="#setThumbPosition/2"><c>setThumbPosition/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getThumbSize" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the thumb or 'view' size. </fsummary>
    <desc><p>Returns the thumb or 'view' size. 
      </p><p>See: <seemfa marker="#setScrollbar/6"><c>setScrollbar/6</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setThumbPosition" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the position of the scrollbar. </fsummary>
    <desc><p>Sets the position of the scrollbar. 
      </p><p>See: <seemfa marker="#getThumbPosition/1"><c>getThumbPosition/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setScrollbar" arity="5" clause_i="1" since=""/>
    <fsummary>See: <c>setScrollbar/6</c></fsummary>
  </func>
  
  <func>
    <name name="setScrollbar" arity="6" clause_i="1" since=""/>
    <fsummary>Sets the scrollbar properties. </fsummary>
    <desc><p>Sets the scrollbar properties. 
      </p><p>Remark: Let's say you wish to display 50 lines of text, using the same font. The window is sized so that you can only see 16 lines at a time. You would use:  The page size is 1 less than the thumb size so that the last line of the previous page will be visible on the next page, to help orient the user. Note that with the window at this size, the thumb position can never go above 50 minus 16, or 34. You can determine how many lines are currently visible by dividing the current view size by the character height in pixels. When defining your own scrollbar behaviour, you will always need to recalculate the scrollbar settings when the window size changes. You could therefore put your scrollbar calculations and <seemfa marker="#setScrollbar/6"><c>setScrollbar/6</c></seemfa> call into a function named AdjustScrollbars, which can be called initially and also from a <seeerl marker="wxSizeEvent"><c>wxSizeEvent</c></seeerl> event handler function. 
      </p></desc>
  </func>
  </funcs>
</erlref>
