/////////////////////////////////////////////////////////////////////////////
// Name:        rescrolw.h
// Purpose:     wxReDirectScrolledWindow class
// Author:      Hans Van Leemputten
// Modified by:
// Created:     18/Apr/2001
// RCS-ID:      $Id: rescrolw.h,v 1.1 2001/04/23 19:44:50 hansvl Exp $
// Copyright:   (c) Hans Van Leemputten
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_WRAPER_RESCROLLWIN_H_
#define _WX_WRAPER_RESCROLLWIN_H_

#ifdef __GNUG__
    #pragma interface "rescrolw.h"
#endif

// ----------------------------------------------------------------------------
// headers and constants
// ----------------------------------------------------------------------------

#include "wx/generic/scrolwin.h"

// ----------------------------------------------------------------------------
// wxReDirectScrolledWindow
// ----------------------------------------------------------------------------

// Use this class when you do not whant to use native scroll bars 
// from wxScrolledWindow, but your own...
// It redifines all scroll bar releated functions. 
// So by creating a parent that is aware of this situation you can take controll

class WXDLLEXPORT wxReDirectScrolledWindow : public wxScrolledWindow
{
public:
	wxReDirectScrolledWindow();
	wxReDirectScrolledWindow( wxWindow *parent,
						wxWindowID id = -1,
						const wxPoint& pos = wxDefaultPosition,
						const wxSize& size = wxDefaultSize,
						long style = wxScrolledWindowStyle,
						const wxString& name = wxPanelNameStr)
	{
        Create(parent, id, pos, size, style, name);
    }

	~wxReDirectScrolledWindow();

    bool Create(wxWindow *parent,
                wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxScrolledWindowStyle,
                const wxString& name = wxPanelNameStr);

	// Interface to alow you to set the control that is controlling 
	// the ScrollBars from wxReDirectScrolledWindow.
    void SetControlWindow( wxWindow *controller );
    wxWindow *GetControlWindow() { return m_ScrollController; }
	
	// Adjust the scrollbars
    // virtual void AdjustScrollbars(void); // Don't know if I need this one???!!!

	// Sets the scrollbar properties of a built-in or external scrollbar.
	virtual void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = TRUE);

	// Sets the position of one of the built-in or external scrollbars
	virtual void SetScrollPos(int orientation, int pos, bool refresh = TRUE);


	// Returns the built-in or external scrollbar thumb size
	virtual int GetScrollThumb(int orientation);

	// Returns the built-in or external scrollbar position.
	virtual int GetScrollPos(int orientation);

	// Returns the built-in or external scrollbar range.
	virtual int GetScrollRange(int orientation);

protected:
	// Function to check if the parent/Controller is known to this class?
	virtual bool KnownController(wxWindow *parent);

	// Get info from the controller 
	// Did the call last redirected succeeded?
	virtual bool CallResult();

	// Let the Controller how is calling next...
	void SetCaller();

protected:
	wxWindow             *m_ScrollController;

private:
    DECLARE_EVENT_TABLE()
    DECLARE_ABSTRACT_CLASS(wxReDirectScrolledWindow)

};

#endif
    // _WX_WRAPER_RESCROLLWIN_H_
