Allow forward declaration of wxSlider in wxMSW (bug 1157614). Remove unused header from wxSliderMSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/slider95.h
|
||||
// Purpose: wxSlider95 class
|
||||
// Purpose: wxSlider class, using the Win95 (and later) trackbar control
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
@@ -19,21 +19,21 @@
|
||||
class WXDLLEXPORT wxSubwindows;
|
||||
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSlider95 : public wxSliderBase
|
||||
class WXDLLEXPORT wxSlider : public wxSliderBase
|
||||
{
|
||||
public:
|
||||
wxSlider95() { Init(); }
|
||||
wxSlider() { Init(); }
|
||||
|
||||
wxSlider95(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int value,
|
||||
int minValue,
|
||||
int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
wxSlider(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int value,
|
||||
int minValue,
|
||||
int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
virtual ~wxSlider95();
|
||||
virtual ~wxSlider();
|
||||
|
||||
// slider methods
|
||||
virtual int GetValue() const;
|
||||
@@ -127,7 +127,7 @@ protected:
|
||||
int m_tickFreq;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider95)
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider)
|
||||
};
|
||||
|
||||
#endif // _WX_SLIDER95_H_
|
||||
|
@@ -1,96 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/slidrmsw.h
|
||||
// Purpose: wxSliderMSW class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _SLIDRMSW_H_
|
||||
#define _SLIDRMSW_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "slidrmsw.h"
|
||||
#endif
|
||||
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSliderMSW : public wxSliderBase
|
||||
{
|
||||
public:
|
||||
wxSliderMSW();
|
||||
|
||||
wxSliderMSW(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
~wxSliderMSW();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
virtual int GetValue() const;
|
||||
virtual void SetValue(int);
|
||||
|
||||
void GetSize(int *x, int *y) const;
|
||||
void GetPosition(int *x, int *y) const;
|
||||
|
||||
bool Show(bool show);
|
||||
|
||||
void SetRange(int minValue, int maxValue);
|
||||
|
||||
int GetMin() const { return m_rangeMin; }
|
||||
int GetMax() const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetPageSize(int pageSize);
|
||||
int GetPageSize() const;
|
||||
void SetLineSize(int lineSize);
|
||||
int GetLineSize() const;
|
||||
|
||||
// these methods get/set the length of the slider pointer in pixels
|
||||
virtual void SetThumbLength(int lenPixels);
|
||||
virtual int GetThumbLength() const ;
|
||||
|
||||
// IMPLEMENTATION
|
||||
WXHWND GetStaticMin() const { return m_staticMin; }
|
||||
WXHWND GetStaticMax() const { return m_staticMax; }
|
||||
WXHWND GetEditValue() const { return m_staticValue; }
|
||||
virtual bool ContainsHWND(WXHWND hWnd) const;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
||||
WXWORD pos, WXHWND control);
|
||||
|
||||
protected:
|
||||
WXHWND m_staticMin;
|
||||
WXHWND m_staticMax;
|
||||
WXHWND m_staticValue;
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSliderMSW)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _SLIDRMSW_H_
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/slider95.h
|
||||
// Name: wx/palmos/slider.h
|
||||
// Purpose: wxSlider class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Wlodzimierz ABX Skiba - native implementation
|
||||
@@ -9,11 +9,11 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _SLIDER95_H_
|
||||
#define _SLIDER95_H_
|
||||
#ifndef _SLIDERPALM_H_
|
||||
#define _SLIDERPALM_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "slider95.h"
|
||||
#pragma interface "slider.h"
|
||||
#endif
|
||||
|
||||
// Slider
|
||||
@@ -94,4 +94,4 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
// _SLIDER95_H_
|
||||
// _SLIDERPALM_H_
|
||||
|
@@ -106,7 +106,9 @@ private:
|
||||
#include "wx/univ/slider.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/slider95.h"
|
||||
#define wxSlider wxSlider95
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
#define wxSlider95 wxSlider
|
||||
#endif
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/slider.h"
|
||||
#elif defined(__WXGTK__)
|
||||
|
Reference in New Issue
Block a user