mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-22 14:20:35 +08:00
Separated out Win95 versions of gauge, slider; added wxTabCtrl::GetCurFocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
+9
-60
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge.h
|
||||
// Purpose: wxGauge class
|
||||
// Purpose: wxGauge header, includes gauge class headers as appropriate
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
@@ -16,66 +16,15 @@
|
||||
#pragma interface "gauge.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||
|
||||
// Group box
|
||||
class WXDLLEXPORT wxGauge: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
public:
|
||||
inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = FALSE; }
|
||||
|
||||
inline wxGauge(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
void SetShadowWidth(const int w);
|
||||
void SetBezelFace(const int w);
|
||||
void SetRange(const int r);
|
||||
void SetValue(const int pos);
|
||||
|
||||
int GetShadowWidth(void) const ;
|
||||
int GetBezelFace(void) const ;
|
||||
int GetRange(void) const ;
|
||||
int GetValue(void) const ;
|
||||
|
||||
void SetForegroundColour(const wxColour& col);
|
||||
void SetBackgroundColour(const wxColour& col);
|
||||
|
||||
// Backward compatibility
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
||||
#ifdef __WIN95__
|
||||
#include "wx/msw/gauge95.h"
|
||||
#define wxGauge wxGauge95
|
||||
#define classwxGauge classwxGauge95
|
||||
#else
|
||||
#include "wx/msw/gaugemsw.h
|
||||
#define wxGauge wxGaugeMSW
|
||||
#define classwxGauge classwxGaugeMSW
|
||||
#endif
|
||||
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Are we a Win95 progress bar, or a normal gauge?
|
||||
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
protected:
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
bool m_useProgressBar;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GAUGEH__
|
||||
|
||||
+12
-92
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: slider.h
|
||||
// Purpose: wxSlider class
|
||||
// Purpose: wxSlider header, includes slider class headers as appropriate
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
@@ -9,102 +9,22 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SLIDERH__
|
||||
#define __SLIDERH__
|
||||
#ifndef _SLIDER_H_
|
||||
#define _SLIDER_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "slider.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSlider: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
|
||||
public:
|
||||
wxSlider(void);
|
||||
|
||||
inline wxSlider(wxWindow *parent, const wxWindowID id,
|
||||
const int value, const int minValue, const int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
~wxSlider(void);
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const int value, const int minValue, const int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
virtual int GetValue(void) const ;
|
||||
virtual void SetValue(const int);
|
||||
void GetSize(int *x, int *y) const ;
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
void GetPosition(int *x, int *y) const ;
|
||||
bool Show(const bool show);
|
||||
|
||||
void SetRange(const int minValue, const int maxValue);
|
||||
|
||||
inline int GetMin(void) const { return m_rangeMin; }
|
||||
inline int GetMax(void) const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetTickFreq(const int n, const int pos);
|
||||
inline int GetTickFreq(void) const { return m_tickFreq; }
|
||||
void SetPageSize(const int pageSize);
|
||||
int GetPageSize(void) const ;
|
||||
void ClearSel(void) ;
|
||||
void ClearTicks(void) ;
|
||||
void SetLineSize(const int lineSize);
|
||||
int GetLineSize(void) const ;
|
||||
int GetSelEnd(void) const ;
|
||||
int GetSelStart(void) const ;
|
||||
void SetSelection(const int minPos, const int maxPos);
|
||||
void SetThumbLength(const int len) ;
|
||||
int GetThumbLength(void) const ;
|
||||
void SetTick(const int tickPos) ;
|
||||
|
||||
// IMPLEMENTATION
|
||||
inline WXHWND GetStaticMin() const { return m_staticMin; }
|
||||
inline WXHWND GetStaticMax() const { return m_staticMax; }
|
||||
inline WXHWND GetEditValue() const { return m_staticValue; }
|
||||
virtual bool ContainsHWND(WXHWND hWnd) const;
|
||||
|
||||
// Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED
|
||||
#if WXWIN_COMPATIBILITY
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
#ifdef __WIN95__
|
||||
#include "wx/msw/slider95.h"
|
||||
#define wxSlider wxSlider95
|
||||
#define classwxSlider classwxSlider95
|
||||
#else
|
||||
#include "wx/msw/slidrmsw.h"
|
||||
#define wxSlider wxSliderMSW
|
||||
#define classwxSlider classwxSliderMSW
|
||||
#endif
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
|
||||
protected:
|
||||
WXHWND m_staticMin;
|
||||
WXHWND m_staticMax;
|
||||
WXHWND m_staticValue;
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __SLIDERH__
|
||||
// _SLIDER_H_
|
||||
|
||||
@@ -51,6 +51,9 @@ class WXDLLEXPORT wxTabCtrl: public wxControl
|
||||
// Get the selection
|
||||
int GetSelection() const;
|
||||
|
||||
// Get the tab with the current keyboard focus
|
||||
int GetCurFocus() const;
|
||||
|
||||
// Get the associated image list
|
||||
wxImageList* GetImageList() const;
|
||||
|
||||
|
||||
+13
-6
@@ -1,11 +1,18 @@
|
||||
#ifndef __TOOLBARH_BASE__
|
||||
#define __TOOLBARH_BASE__
|
||||
#ifndef _TOOLBAR_H_BASE_
|
||||
#define _TOOLBAR_H_BASE_
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#include "wx/tbar95.h"
|
||||
#if defined(__WINDOWS__) && defined(__WIN95__)
|
||||
# include "wx/tbar95.h"
|
||||
# define wxToolBar wxToolBar95
|
||||
# define classwxToolBar classwxToolBar95
|
||||
#elif defined(__WINDOWS__)
|
||||
# include "wx/tbarmsw.h"
|
||||
# define wxToolBar wxToolBarMSW
|
||||
# define classwxToolBar classwxToolBarMSW
|
||||
#elif defined(__GTK__)
|
||||
#include "wx/gtk/tbargtk.h"
|
||||
# include "wx/gtk/tbargtk.h"
|
||||
# define classwxToolBar wxToolBarGTK
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __TOOLBARH_BASE__
|
||||
// _TOOLBAR_H_BASE_
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// #define __GOOD_COMPILER__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define __GOOD_COMPILER__
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge95.cpp
|
||||
// Purpose: wxGauge95 class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "gauge95.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#if USE_GAUGE && defined(__WIN95__)
|
||||
|
||||
#include "wx/msw/gauge95.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if defined(__WIN95__) && !defined(__GNUWIN32__)
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl)
|
||||
#endif
|
||||
|
||||
bool wxGauge95::Create(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
SetName(name);
|
||||
SetValidator(validator);
|
||||
|
||||
if (parent) parent->AddChild(this);
|
||||
m_rangeMax = range;
|
||||
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
else
|
||||
m_windowId = id;
|
||||
|
||||
int x = pos.x;
|
||||
int y = pos.y;
|
||||
int width = size.x;
|
||||
int height = size.y;
|
||||
|
||||
long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
|
||||
|
||||
HWND wx_button =
|
||||
CreateWindowEx(MakeExtendedStyle(m_windowStyle), PROGRESS_CLASS, NULL, msFlags,
|
||||
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
|
||||
wxGetInstance(), NULL);
|
||||
|
||||
m_hWnd = (WXHWND)wx_button;
|
||||
|
||||
// Subclass again for purposes of dialog editing mode
|
||||
SubclassWin((WXHWND) wx_button);
|
||||
|
||||
SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range));
|
||||
|
||||
SetFont(* parent->GetFont());
|
||||
|
||||
if (width == -1)
|
||||
width = 50;
|
||||
if (height == -1)
|
||||
height = 50;
|
||||
SetSize(x, y, width, height);
|
||||
|
||||
ShowWindow((HWND) GetHWND(), SW_SHOW);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxGauge95::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags)
|
||||
{
|
||||
int currentX, currentY;
|
||||
GetPosition(¤tX, ¤tY);
|
||||
int x1 = x;
|
||||
int y1 = y;
|
||||
int w1 = width;
|
||||
int h1 = height;
|
||||
|
||||
if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
x1 = currentX;
|
||||
if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
y1 = currentY;
|
||||
|
||||
// If we're prepared to use the existing size, then...
|
||||
if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
|
||||
{
|
||||
GetSize(&w1, &h1);
|
||||
}
|
||||
|
||||
// Deal with default size (using -1 values)
|
||||
if (w1<=0)
|
||||
w1 = DEFAULT_ITEM_WIDTH;
|
||||
|
||||
if (h1<=0)
|
||||
h1 = DEFAULT_ITEM_HEIGHT;
|
||||
|
||||
MoveWindow((HWND) GetHWND(), x1, y1, w1, h1, TRUE);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
GetEventHandler()->OldOnSize(width, height);
|
||||
#else
|
||||
wxSizeEvent event(wxSize(width, height), m_windowId);
|
||||
event.eventObject = this;
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxGauge95::SetShadowWidth(const int w)
|
||||
{
|
||||
}
|
||||
|
||||
void wxGauge95::SetBezelFace(const int w)
|
||||
{
|
||||
}
|
||||
|
||||
void wxGauge95::SetRange(const int r)
|
||||
{
|
||||
m_rangeMax = r;
|
||||
|
||||
SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, r));
|
||||
}
|
||||
|
||||
void wxGauge95::SetValue(const int pos)
|
||||
{
|
||||
m_gaugePos = pos;
|
||||
|
||||
SendMessage((HWND) GetHWND(), PBM_SETPOS, pos, 0);
|
||||
}
|
||||
|
||||
int wxGauge95::GetShadowWidth(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wxGauge95::GetBezelFace(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wxGauge95::GetRange(void) const
|
||||
{
|
||||
return m_rangeMax;
|
||||
}
|
||||
|
||||
int wxGauge95::GetValue(void) const
|
||||
{
|
||||
return m_gaugePos;
|
||||
}
|
||||
|
||||
void wxGauge95::SetForegroundColour(const wxColour& col)
|
||||
{
|
||||
m_foregroundColour = col ;
|
||||
}
|
||||
|
||||
void wxGauge95::SetBackgroundColour(const wxColour& col)
|
||||
{
|
||||
m_backgroundColour = col ;
|
||||
}
|
||||
|
||||
#endif // USE_GAUGE
|
||||
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge.cpp
|
||||
// Purpose: wxGauge class
|
||||
// Name: gaugemsw.cpp
|
||||
// Purpose: wxGaugeMSW class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#if USE_GAUGE
|
||||
|
||||
#include "wx/gauge.h"
|
||||
#include "wx/msw/gaugemsw.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
/* gas gauge graph control messages--class "zYzGauge" */
|
||||
@@ -53,24 +53,17 @@
|
||||
#define ZYZG_ORIENT_BOTTOMTOTOP 2
|
||||
#define ZYZG_ORIENT_TOPTOBOTTOM 3
|
||||
|
||||
|
||||
/* gauge styles */
|
||||
#define ZYZGS_3D 0x8000L /* control will be 3D */
|
||||
|
||||
/* public function prototypes */
|
||||
BOOL FAR PASCAL gaugeInit(HINSTANCE hInstance);
|
||||
|
||||
#define USE_PROGRESS_BAR 1
|
||||
|
||||
#if defined(__WIN95__) && !defined(__GNUWIN32__)
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxGaugeMSW, wxControl)
|
||||
#endif
|
||||
|
||||
bool wxGauge::Create(wxWindow *parent, const wxWindowID id,
|
||||
bool wxGaugeMSW::Create(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@@ -78,13 +71,13 @@ bool wxGauge::Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
static bool wxGaugeInitialised = FALSE;
|
||||
static bool wxGaugeMSWInitialised = FALSE;
|
||||
|
||||
if ( !wxGaugeInitialised )
|
||||
if ( !wxGaugeMSWInitialised )
|
||||
{
|
||||
if (!gaugeInit((HWND) wxGetInstance()))
|
||||
wxFatalError("Cannot initalize Gauge library");
|
||||
wxGaugeInitialised = TRUE;
|
||||
wxGaugeMSWInitialised = TRUE;
|
||||
}
|
||||
|
||||
SetName(name);
|
||||
@@ -96,7 +89,6 @@ bool wxGauge::Create(wxWindow *parent, const wxWindowID id,
|
||||
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
|
||||
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
|
||||
|
||||
m_useProgressBar = FALSE;
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
@@ -109,60 +101,31 @@ bool wxGauge::Create(wxWindow *parent, const wxWindowID id,
|
||||
int width = size.x;
|
||||
int height = size.y;
|
||||
|
||||
// Use the Win95 progress bar if possible, but not if
|
||||
// we request a vertical gauge.
|
||||
#if defined(__WIN95__) && USE_PROGRESS_BAR
|
||||
if ((m_windowStyle & wxGA_PROGRESSBAR) && ((m_windowStyle & wxGA_HORIZONTAL) == wxGA_HORIZONTAL))
|
||||
m_useProgressBar = TRUE;
|
||||
#endif
|
||||
long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
|
||||
msFlags |= ZYZGS_3D;
|
||||
|
||||
if (m_useProgressBar)
|
||||
{
|
||||
#if defined(__WIN95__) && USE_PROGRESS_BAR
|
||||
long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
|
||||
|
||||
HWND wx_button =
|
||||
CreateWindowEx(MakeExtendedStyle(m_windowStyle), PROGRESS_CLASS, NULL, msFlags,
|
||||
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
|
||||
wxGetInstance(), NULL);
|
||||
|
||||
m_hWnd = (WXHWND)wx_button;
|
||||
|
||||
// Subclass again for purposes of dialog editing mode
|
||||
SubclassWin((WXHWND) wx_button);
|
||||
|
||||
SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
|
||||
/* if (m_windowStyle & wxTHREED) */
|
||||
msFlags |= ZYZGS_3D;
|
||||
|
||||
HWND wx_button =
|
||||
HWND wx_button =
|
||||
CreateWindowEx(MakeExtendedStyle(m_windowStyle), "zYzGauge", NULL, msFlags,
|
||||
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
|
||||
wxGetInstance(), NULL);
|
||||
|
||||
m_hWnd = (WXHWND)wx_button;
|
||||
m_hWnd = (WXHWND)wx_button;
|
||||
|
||||
// Subclass again for purposes of dialog editing mode
|
||||
SubclassWin((WXHWND)wx_button);
|
||||
// Subclass again for purposes of dialog editing mode
|
||||
SubclassWin((WXHWND)wx_button);
|
||||
|
||||
int wOrient = 0;
|
||||
int wOrient = 0;
|
||||
|
||||
if (m_windowStyle & wxGA_HORIZONTAL)
|
||||
wOrient = ZYZG_ORIENT_LEFTTORIGHT;
|
||||
else
|
||||
wOrient = ZYZG_ORIENT_BOTTOMTOTOP;
|
||||
if (m_windowStyle & wxGA_HORIZONTAL)
|
||||
wOrient = ZYZG_ORIENT_LEFTTORIGHT;
|
||||
else
|
||||
wOrient = ZYZG_ORIENT_BOTTOMTOTOP;
|
||||
|
||||
SendMessage(wx_button, ZYZG_SETORIENTATION, wOrient, 0);
|
||||
SendMessage(wx_button, ZYZG_SETRANGE, range, 0);
|
||||
SendMessage(wx_button, ZYZG_SETORIENTATION, wOrient, 0);
|
||||
SendMessage(wx_button, ZYZG_SETRANGE, range, 0);
|
||||
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue()));
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
|
||||
}
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue()));
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue()));
|
||||
|
||||
SetFont(* parent->GetFont());
|
||||
|
||||
@@ -177,7 +140,7 @@ bool wxGauge::Create(wxWindow *parent, const wxWindowID id,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxGauge::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags)
|
||||
void wxGaugeMSW::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags)
|
||||
{
|
||||
int currentX, currentY;
|
||||
GetPosition(¤tX, ¤tY);
|
||||
@@ -215,98 +178,60 @@ void wxGauge::SetSize(const int x, const int y, const int width, const int heigh
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxGauge::SetShadowWidth(const int w)
|
||||
void wxGaugeMSW::SetShadowWidth(const int w)
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
{
|
||||
}
|
||||
else
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETWIDTH3D, w, 0);
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETWIDTH3D, w, 0);
|
||||
}
|
||||
|
||||
void wxGauge::SetBezelFace(const int w)
|
||||
void wxGaugeMSW::SetBezelFace(const int w)
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
{
|
||||
}
|
||||
else
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBEZELFACE, w, 0);
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBEZELFACE, w, 0);
|
||||
}
|
||||
|
||||
void wxGauge::SetRange(const int r)
|
||||
void wxGaugeMSW::SetRange(const int r)
|
||||
{
|
||||
m_rangeMax = r;
|
||||
|
||||
#if defined(__WIN95__) && USE_PROGRESS_BAR
|
||||
if (m_useProgressBar)
|
||||
SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, r));
|
||||
else
|
||||
#endif
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETRANGE, r, 0);
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETRANGE, r, 0);
|
||||
}
|
||||
|
||||
void wxGauge::SetValue(const int pos)
|
||||
void wxGaugeMSW::SetValue(const int pos)
|
||||
{
|
||||
m_gaugePos = pos;
|
||||
|
||||
#if defined(__WIN95__) && USE_PROGRESS_BAR
|
||||
if (m_useProgressBar)
|
||||
SendMessage((HWND) GetHWND(), PBM_SETPOS, pos, 0);
|
||||
else
|
||||
#endif
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETPOSITION, pos, 0);
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETPOSITION, pos, 0);
|
||||
}
|
||||
|
||||
int wxGauge::GetShadowWidth(void) const
|
||||
int wxGaugeMSW::GetShadowWidth(void) const
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
return 0;
|
||||
else
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETWIDTH3D, 0, 0);
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETWIDTH3D, 0, 0);
|
||||
}
|
||||
|
||||
int wxGauge::GetBezelFace(void) const
|
||||
int wxGaugeMSW::GetBezelFace(void) const
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
return 0;
|
||||
else
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETBEZELFACE, 0, 0);
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETBEZELFACE, 0, 0);
|
||||
}
|
||||
|
||||
int wxGauge::GetRange(void) const
|
||||
int wxGaugeMSW::GetRange(void) const
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
return m_rangeMax;
|
||||
else
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETRANGE, 0, 0);
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETRANGE, 0, 0);
|
||||
}
|
||||
|
||||
int wxGauge::GetValue(void) const
|
||||
int wxGaugeMSW::GetValue(void) const
|
||||
{
|
||||
if (m_useProgressBar)
|
||||
return m_gaugePos;
|
||||
else
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETPOSITION, 0, 0);
|
||||
return (int) SendMessage((HWND) GetHWND(), ZYZG_GETPOSITION, 0, 0);
|
||||
}
|
||||
|
||||
void wxGauge::SetForegroundColour(const wxColour& col)
|
||||
void wxGaugeMSW::SetForegroundColour(const wxColour& col)
|
||||
{
|
||||
m_foregroundColour = col ;
|
||||
if (m_useProgressBar)
|
||||
{
|
||||
}
|
||||
else
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue()));
|
||||
m_foregroundColour = col ;
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETFGCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue()));
|
||||
}
|
||||
|
||||
void wxGauge::SetBackgroundColour(const wxColour& col)
|
||||
void wxGaugeMSW::SetBackgroundColour(const wxColour& col)
|
||||
{
|
||||
m_backgroundColour = col ;
|
||||
if (m_useProgressBar)
|
||||
{
|
||||
}
|
||||
else
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue()));
|
||||
m_backgroundColour = col ;
|
||||
SendMessage((HWND) GetHWND(), ZYZG_SETBKCOLOR, 0, RGB(col.Red(), col.Green(), col.Blue()));
|
||||
}
|
||||
|
||||
|
||||
@@ -902,8 +902,6 @@ long wxListCtrl::HitTest(const wxPoint& point, int& flags)
|
||||
|
||||
// Inserts an item, returning the index of the new item if successful,
|
||||
// -1 otherwise.
|
||||
// TOD: Should also have some further convenience functions
|
||||
// which don't require setting a wxListItem object
|
||||
long wxListCtrl::InsertItem(wxListItem& info)
|
||||
{
|
||||
LV_ITEM item;
|
||||
|
||||
+10
-3
@@ -139,6 +139,8 @@ MSWOBJS = \
|
||||
$(MSWDIR)\fontdlg.obj \
|
||||
$(MSWDIR)\frame.obj \
|
||||
$(MSWDIR)\gauge.obj \
|
||||
$(MSWDIR)\gauge95.obj \
|
||||
$(MSWDIR)\gaugemsw.obj \
|
||||
$(MSWDIR)\gdiobj.obj \
|
||||
$(MSWDIR)\helpwin.obj \
|
||||
$(MSWDIR)\icon.obj \
|
||||
@@ -166,7 +168,8 @@ MSWOBJS = \
|
||||
$(MSWDIR)\registry.obj \
|
||||
$(MSWDIR)\scrolbar.obj \
|
||||
$(MSWDIR)\settings.obj \
|
||||
$(MSWDIR)\slider.obj \
|
||||
$(MSWDIR)\slidrmsw.obj \
|
||||
$(MSWDIR)\slider95.obj \
|
||||
$(MSWDIR)\spinbutt.obj \
|
||||
$(MSWDIR)\statbmp.obj \
|
||||
$(MSWDIR)\statbox.obj \
|
||||
@@ -278,7 +281,9 @@ $(MSWDIR)\fontdlg.obj: $(MSWDIR)\fontdlg.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\frame.obj: $(MSWDIR)\frame.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\gauge.obj: $(MSWDIR)\gauge.$(SRCSUFF)
|
||||
$(MSWDIR)\gaugemsw.obj: $(MSWDIR)\gaugemsw.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\gauge95.obj: $(MSWDIR)\gauge95.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\gdiobj.obj: $(MSWDIR)\gdiobj.$(SRCSUFF)
|
||||
|
||||
@@ -332,7 +337,9 @@ $(MSWDIR)\scrolbar.obj: $(MSWDIR)\scrolbar.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\settings.obj: $(MSWDIR)\settings.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\slider.obj: $(MSWDIR)\slider.$(SRCSUFF)
|
||||
$(MSWDIR)\slidrmsw.obj: $(MSWDIR)\slidrmsw.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\slider95.obj: $(MSWDIR)\slider95.$(SRCSUFF)
|
||||
|
||||
$(MSWDIR)\spinbutt.obj: $(MSWDIR)\spinbutt.$(SRCSUFF)
|
||||
|
||||
|
||||
+4
-10
@@ -139,7 +139,7 @@ MSWOBJS = \
|
||||
$(MSWDIR)\font.obj \
|
||||
$(MSWDIR)\fontdlg.obj \
|
||||
$(MSWDIR)\frame.obj \
|
||||
$(MSWDIR)\gauge.obj \
|
||||
$(MSWDIR)\gaugemsw.obj \
|
||||
$(MSWDIR)\gdiobj.obj \
|
||||
$(MSWDIR)\helpwin.obj \
|
||||
$(MSWDIR)\icon.obj \
|
||||
@@ -166,12 +166,11 @@ MSWOBJS = \
|
||||
$(MSWDIR)\region.obj \
|
||||
$(MSWDIR)\scrolbar.obj \
|
||||
$(MSWDIR)\settings.obj \
|
||||
$(MSWDIR)\slider.obj \
|
||||
$(MSWDIR)\slidrmsw.obj \
|
||||
$(MSWDIR)\spinbutt.obj \
|
||||
$(MSWDIR)\statbmp.obj \
|
||||
$(MSWDIR)\statbox.obj \
|
||||
$(MSWDIR)\stattext.obj \
|
||||
$(MSWDIR)\tbar95.obj \
|
||||
$(MSWDIR)\tbarmsw.obj \
|
||||
$(MSWDIR)\textctrl.obj \
|
||||
$(MSWDIR)\timer.obj \
|
||||
@@ -394,7 +393,7 @@ $(MSWDIR)/frame.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/gauge.obj: $*.$(SRCSUFF)
|
||||
$(MSWDIR)/gaugemsw.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
@@ -534,7 +533,7 @@ $(MSWDIR)/settings.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/slider.obj: $*.$(SRCSUFF)
|
||||
$(MSWDIR)/slidrmsw.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
@@ -559,11 +558,6 @@ $(MSWDIR)/stattext.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/tbar95.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/tbarmsw.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
|
||||
@@ -144,7 +144,8 @@ MSWOBJS = \
|
||||
font.$(OBJSUFF) \
|
||||
fontdlg.$(OBJSUFF) \
|
||||
frame.$(OBJSUFF) \
|
||||
gauge.$(OBJSUFF) \
|
||||
gaugemsw.$(OBJSUFF) \
|
||||
gauge95.$(OBJSUFF) \
|
||||
gdiobj.$(OBJSUFF) \
|
||||
helpwin.$(OBJSUFF) \
|
||||
icon.$(OBJSUFF) \
|
||||
@@ -172,7 +173,8 @@ MSWOBJS = \
|
||||
registry.$(OBJSUFF) \
|
||||
scrolbar.$(OBJSUFF) \
|
||||
settings.$(OBJSUFF) \
|
||||
slider.$(OBJSUFF) \
|
||||
slidrmsw.$(OBJSUFF) \
|
||||
slider95.$(OBJSUFF) \
|
||||
spinbutt.$(OBJSUFF) \
|
||||
statbmp.$(OBJSUFF) \
|
||||
statbox.$(OBJSUFF) \
|
||||
|
||||
+16
-4
@@ -143,7 +143,8 @@ MSWOBJS = \
|
||||
$(MSWDIR)\font.obj \
|
||||
$(MSWDIR)\fontdlg.obj \
|
||||
$(MSWDIR)\frame.obj \
|
||||
$(MSWDIR)\gauge.obj \
|
||||
$(MSWDIR)\gauge95.obj \
|
||||
$(MSWDIR)\gaugemsw.obj \
|
||||
$(MSWDIR)\gdiobj.obj \
|
||||
$(MSWDIR)\helpwin.obj \
|
||||
$(MSWDIR)\icon.obj \
|
||||
@@ -172,7 +173,8 @@ MSWOBJS = \
|
||||
$(MSWDIR)\registry.obj \
|
||||
$(MSWDIR)\scrolbar.obj \
|
||||
$(MSWDIR)\settings.obj \
|
||||
$(MSWDIR)\slider.obj \
|
||||
$(MSWDIR)\slidrmsw.obj \
|
||||
$(MSWDIR)\slider95.obj \
|
||||
$(MSWDIR)\spinbutt.obj \
|
||||
$(MSWDIR)\statbmp.obj \
|
||||
$(MSWDIR)\statbox.obj \
|
||||
@@ -414,7 +416,12 @@ $(MSWDIR)/frame.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(MSWDIR)/gauge.obj: $*.$(SRCSUFF)
|
||||
$(MSWDIR)/gauge95.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(MSWDIR)/gaugemsw.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
@@ -559,7 +566,12 @@ $(MSWDIR)/settings.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(MSWDIR)/slider.obj: $*.$(SRCSUFF)
|
||||
$(MSWDIR)/slidrmsw.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(MSWDIR)/slider95.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -228,6 +228,12 @@ int wxTabCtrl::GetSelection() const
|
||||
return (int) TabCtrl_GetCurSel( (HWND) GetHWND() );
|
||||
}
|
||||
|
||||
// Get the tab with the current keyboard focus
|
||||
int wxTabCtrl::GetCurFocus() const
|
||||
{
|
||||
return (int) TabCtrl_GetCurFocus( (HWND) GetHWND() );
|
||||
}
|
||||
|
||||
// Get the associated image list
|
||||
wxImageList* wxTabCtrl::GetImageList() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user