1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/cocoa/scrolbar.h 
   3 // Purpose:     wxScrollBar class 
   4 // Author:      David Elliott 
   8 // Copyright:   (c) 2004 David Elliott 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 #ifndef _WX_COCOA_SCROLBAR_H__ 
  13 #define _WX_COCOA_SCROLBAR_H__ 
  15 #include "wx/cocoa/NSScroller.h" 
  17 // ======================================================================== 
  19 // ======================================================================== 
  20 class WXDLLIMPEXP_CORE wxScrollBar
: public wxScrollBarBase
, protected wxCocoaNSScroller
 
  22     DECLARE_DYNAMIC_CLASS(wxScrollBar
) 
  24     WX_DECLARE_COCOA_OWNER(NSScroller
,NSControl
,NSView
) 
  25 // ------------------------------------------------------------------------ 
  27 // ------------------------------------------------------------------------ 
  30     wxScrollBar(wxWindow 
*parent
, wxWindowID winid
, 
  31             const wxPoint
& pos 
= wxDefaultPosition
, 
  32             const wxSize
& size 
= wxDefaultSize
, 
  33             long style 
= wxSB_HORIZONTAL
, 
  34             const wxValidator
& validator 
= wxDefaultValidator
, 
  35             const wxString
& name 
= wxScrollBarNameStr
) 
  37         Create(parent
, winid
, pos
, size
, style
, validator
, name
); 
  40     bool Create(wxWindow 
*parent
, wxWindowID winid
, 
  41             const wxPoint
& pos 
= wxDefaultPosition
, 
  42             const wxSize
& size 
= wxDefaultSize
, 
  43             long style 
= wxSB_HORIZONTAL
, 
  44             const wxValidator
& validator 
= wxDefaultValidator
, 
  45             const wxString
& name 
= wxScrollBarNameStr
); 
  46     virtual ~wxScrollBar(); 
  48 // ------------------------------------------------------------------------ 
  50 // ------------------------------------------------------------------------ 
  52     virtual void Cocoa_wxNSScrollerAction(void); 
  53 // ------------------------------------------------------------------------ 
  55 // ------------------------------------------------------------------------ 
  58     virtual int GetThumbPosition() const; 
  59     virtual int GetThumbSize() const { return m_thumbSize
; } 
  60     virtual int GetPageSize() const { return m_pageSize
; } 
  61     virtual int GetRange() const { return m_range
; } 
  64     virtual void SetThumbPosition(int viewStart
); 
  65     virtual void SetScrollbar(int position
, int thumbSize
, 
  66                               int range
, int pageSize
, 
  75     // _WX_COCOA_SCROLBAR_H__