]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stubs/scrolbar.cpp
Added stubs .cpp files.
[wxWidgets.git] / src / stubs / scrolbar.cpp
diff --git a/src/stubs/scrolbar.cpp b/src/stubs/scrolbar.cpp
new file mode 100644 (file)
index 0000000..0058a14
--- /dev/null
@@ -0,0 +1,78 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        scrolbar.cpp
+// Purpose:     wxScrollBar
+// Author:      AUTHOR
+// Modified by:
+// Created:     ??/??/98
+// RCS-ID:      $Id$
+// Copyright:   (c) AUTHOR
+// Licence:    wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "scrolbar.h"
+#endif
+
+#include "wx/scrolbar.h"
+
+#if !USE_SHARED_LIBRARY
+IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
+
+#endif
+
+// Scrollbar
+bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
+           const wxPoint& pos,
+           const wxSize& size, long style,
+           const wxValidator& validator,
+           const wxString& name)
+{
+    if (!parent)
+        return FALSE;
+    parent->AddChild(this);
+    SetName(name);
+       SetValidator(validator);
+    
+    m_windowStyle = style;
+
+    if ( id == -1 )
+           m_windowId = (int)NewControlId();
+    else
+           m_windowId = id;
+
+    // TODO create scrollbar
+    return TRUE;
+}
+
+wxScrollBar::~wxScrollBar()
+{
+}
+
+void wxScrollBar::SetPosition(int viewStart)
+{
+    // TODO
+}
+
+int wxScrollBar::GetPosition() const
+{
+    // TODO
+    return 0;
+}
+
+void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
+    bool refresh)
+{
+    m_viewSize = pageSize;
+    m_pageSize = thumbSize;
+    m_objectSize = range;
+
+    // TODO
+}
+
+
+void wxScrollBar::Command(wxCommandEvent& event)
+{
+    SetValue(event.m_commandInt);
+    ProcessCommand(event);
+}
+