Include wx/gauge.h according to precompiled headers of wx/wx.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-06-06 22:02:01 +00:00
parent b2e178485a
commit 9d2c19f136
10 changed files with 89 additions and 87 deletions

View File

@@ -1,20 +1,22 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cocoa/gauge.mm // Name: src/cocoa/gauge.mm
// Purpose: wxGauge // Purpose: wxGauge
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2003/07/15 // Created: 2003/07/15
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott // Copyright: (c) 2003 David Elliott
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_GAUGE #if wxUSE_GAUGE
#include "wx/gauge.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/gauge.h"
#include "wx/log.h" #include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
@@ -26,6 +28,7 @@
#include <math.h> #include <math.h>
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
BEGIN_EVENT_TABLE(wxGauge, wxGaugeBase) BEGIN_EVENT_TABLE(wxGauge, wxGaugeBase)
END_EVENT_TABLE() END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxGauge,NSProgressIndicator,NSView,NSView) // WX_IMPLEMENT_COCOA_OWNER(wxGauge,NSProgressIndicator,NSView,NSView)

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gauge.cpp // Name: src/gtk/gauge.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,10 +10,10 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/gauge.h"
#if wxUSE_GAUGE #if wxUSE_GAUGE
#include "wx/gauge.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -31,13 +31,13 @@ bool wxGauge::Create( wxWindow *parent,
const wxValidator& validator, const wxValidator& validator,
const wxString& name ) const wxString& name )
{ {
m_needParent = TRUE; m_needParent = true;
if (!PreCreation( parent, pos, size ) || if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name )) !CreateBase( parent, id, pos, size, style, validator, name ))
{ {
wxFAIL_MSG( wxT("wxGauge creation failed") ); wxFAIL_MSG( wxT("wxGauge creation failed") );
return FALSE; return false;
} }
m_rangeMax = range; m_rangeMax = range;
@@ -54,7 +54,7 @@ bool wxGauge::Create( wxWindow *parent,
PostCreation(size); PostCreation(size);
SetBestSize(size); SetBestSize(size);
return TRUE; return true;
} }
void wxGauge::DoSetGauge() void wxGauge::DoSetGauge()
@@ -123,4 +123,3 @@ wxGauge::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
} }
#endif // wxUSE_GAUGE #endif // wxUSE_GAUGE

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gauge.cpp // Name: src/gtk1/gauge.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,10 +10,10 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/gauge.h"
#if wxUSE_GAUGE #if wxUSE_GAUGE
#include "wx/gauge.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -31,13 +31,13 @@ bool wxGauge::Create( wxWindow *parent,
const wxValidator& validator, const wxValidator& validator,
const wxString& name ) const wxString& name )
{ {
m_needParent = TRUE; m_needParent = true;
if (!PreCreation( parent, pos, size ) || if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name )) !CreateBase( parent, id, pos, size, style, validator, name ))
{ {
wxFAIL_MSG( wxT("wxGauge creation failed") ); wxFAIL_MSG( wxT("wxGauge creation failed") );
return FALSE; return false;
} }
m_rangeMax = range; m_rangeMax = range;
@@ -54,7 +54,7 @@ bool wxGauge::Create( wxWindow *parent,
PostCreation(size); PostCreation(size);
SetBestSize(size); SetBestSize(size);
return TRUE; return true;
} }
void wxGauge::DoSetGauge() void wxGauge::DoSetGauge()
@@ -123,4 +123,3 @@ wxGauge::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
} }
#endif // wxUSE_GAUGE #endif // wxUSE_GAUGE

View File

@@ -1,14 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gauge.cpp // Name: src/mac/classic/gauge.cpp
// Purpose: wxGauge class // Purpose: wxGauge class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if wxUSE_GAUGE
#include "wx/gauge.h" #include "wx/gauge.h"
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
@@ -16,12 +21,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
bool wxGauge::Create(wxWindow *parent, wxWindowID id, bool wxGauge::Create(wxWindow *parent, wxWindowID id,
int range, int range,
const wxPoint& pos, const wxPoint& pos,
const wxSize& s, const wxSize& s,
long style, long style,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
if ( !wxGaugeBase::Create(parent, id, range, pos, s, style, validator, name) ) if ( !wxGaugeBase::Create(parent, id, range, pos, s, style, validator, name) )
return false; return false;
@@ -31,20 +36,20 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
Str255 title ; Str255 title ;
m_rangeMax = range ; m_rangeMax = range ;
m_gaugePos = 0 ; m_gaugePos = 0 ;
if ( size.x == wxDefaultCoord && size.y == wxDefaultCoord) if ( size.x == wxDefaultCoord && size.y == wxDefaultCoord)
{ {
size = wxSize( 200 , 16 ) ; size = wxSize( 200 , 16 ) ;
} }
MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ; MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ;
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range, m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range,
kControlProgressBarProc , (long) this ) ; kControlProgressBarProc , (long) this ) ;
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }
void wxGauge::SetShadowWidth(int w) void wxGauge::SetShadowWidth(int w)
@@ -87,3 +92,4 @@ int wxGauge::GetValue() const
return m_gaugePos; return m_gaugePos;
} }
#endif // wxUSE_GAUGE

View File

@@ -26,10 +26,11 @@
#if wxUSE_GAUGE #if wxUSE_GAUGE
#include "wx/gauge.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif #endif
#include "wx/gauge.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
// include <commctrl.h> "properly" // include <commctrl.h> "properly"

View File

@@ -11,13 +11,16 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_GAUGE
#include "wx/gauge.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/scrolwin.h" #include "wx/scrolwin.h"
#endif #endif
#include "wx/os2/private.h" #include "wx/os2/private.h"
#include "wx/gauge.h"
static WXFARPROC fnWndProcGauge = (WXFARPROC)NULL; static WXFARPROC fnWndProcGauge = (WXFARPROC)NULL;
extern void wxAssociateWinWithHandle( HWND hWnd extern void wxAssociateWinWithHandle( HWND hWnd
@@ -26,22 +29,20 @@ extern void wxAssociateWinWithHandle( HWND hWnd
IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
MRESULT EXPENTRY wxGaugeWndProc( MRESULT EXPENTRY wxGaugeWndProc( HWND hWnd,
HWND hWnd UINT uMessage,
, UINT uMessage MPARAM wParam,
, MPARAM wParam MPARAM lParam )
, MPARAM lParam
)
{ {
wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
,QWL_USER ,QWL_USER
); );
HPS hPS; HPS hPS;
RECTL vRect; RECTL vRect;
RECTL vRect2; RECTL vRect2;
RECTL vRect3; RECTL vRect3;
double dPixelToRange = 0.0; double dPixelToRange = 0.0;
double dRange = 0.0; double dRange = 0.0;
switch (uMessage ) switch (uMessage )
{ {
@@ -129,23 +130,21 @@ MRESULT EXPENTRY wxGaugeWndProc(
); );
} // end of wxGaugeWndProc } // end of wxGaugeWndProc
bool wxGauge::Create( bool wxGauge::Create( wxWindowOS2* pParent,
wxWindowOS2* pParent wxWindowID vId,
, wxWindowID vId int nRange,
, int nRange const wxPoint& rPos,
, const wxPoint& rPos const wxSize& rSize,
, const wxSize& rSize long lStyle,
, long lStyle const wxValidator& rValidator,
, const wxValidator& rValidator const wxString& rsName )
, const wxString& rsName
)
{ {
int nX = rPos.x; int nX = rPos.x;
int nY = rPos.y; int nY = rPos.y;
int nWidth = rSize.x; int nWidth = rSize.x;
int nHeight = rSize.y; int nHeight = rSize.y;
long lMsStyle = 0L; long lMsStyle = 0L;
SWP vSwp; SWP vSwp;
SetName(rsName); SetName(rsName);
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
@@ -160,7 +159,7 @@ bool wxGauge::Create(
m_nGaugePos = 0; m_nGaugePos = 0;
m_windowStyle = lStyle; m_windowStyle = lStyle;
if (vId == -1) if (vId == wxID_ANY)
m_windowId = (int)NewControlId(); m_windowId = (int)NewControlId();
else else
m_windowId = vId; m_windowId = vId;
@@ -217,7 +216,7 @@ bool wxGauge::Create(
m_nHeight = nHeight; m_nHeight = nHeight;
::WinShowWindow((HWND)GetHWND(), TRUE); ::WinShowWindow((HWND)GetHWND(), TRUE);
delete pTextFont; delete pTextFont;
return TRUE; return true;
} // end of wxGauge::Create } // end of wxGauge::Create
int wxGauge::GetBezelFace() const int wxGauge::GetBezelFace() const
@@ -255,9 +254,7 @@ bool wxGauge::SetBackgroundColour( const wxColour& rColour )
return true; return true;
} // end of wxGauge::SetBackgroundColour } // end of wxGauge::SetBackgroundColour
void wxGauge::SetBezelFace( void wxGauge::SetBezelFace( int WXUNUSED(nWidth) )
int WXUNUSED(nWidth)
)
{ {
} // end of wxGauge::SetBezelFace } // end of wxGauge::SetBezelFace
@@ -277,24 +274,18 @@ bool wxGauge::SetForegroundColour( const wxColour& rColour )
return true; return true;
} // end of wxGauge::SetForegroundColour } // end of wxGauge::SetForegroundColour
void wxGauge::SetRange( void wxGauge::SetRange( int nRange )
int nRange
)
{ {
m_nRangeMax = nRange; m_nRangeMax = nRange;
} // end of wxGauge::SetRange } // end of wxGauge::SetRange
void wxGauge::SetShadowWidth( void wxGauge::SetShadowWidth( int WXUNUSED(nWidth) )
int WXUNUSED(nWidth)
)
{ {
} // end of wxGauge::SetShadowWidth } // end of wxGauge::SetShadowWidth
void wxGauge::SetValue( void wxGauge::SetValue( int nPos )
int nPos
)
{ {
RECT vRect; RECT vRect;
m_nGaugePos = nPos; m_nGaugePos = nPos;
::WinQueryWindowRect(GetHwnd(), &vRect); ::WinQueryWindowRect(GetHwnd(), &vRect);
@@ -305,3 +296,5 @@ wxSize wxGauge::DoGetBestSize() const
{ {
return wxSize(m_nWidth,m_nHeight); return wxSize(m_nWidth,m_nHeight);
} }
#endif // wxUSE_GAUGE

View File

@@ -26,10 +26,11 @@
#if wxUSE_GAUGE #if wxUSE_GAUGE
#include "wx/gauge.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif #endif
#include "wx/gauge.h"
#include "wx/palmos/private.h" #include "wx/palmos/private.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -32,6 +32,7 @@
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/gauge.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/image.h" #include "wx/image.h"
@@ -40,10 +41,6 @@
#include "wx/univ/renderer.h" #include "wx/univ/renderer.h"
#include "wx/univ/colschem.h" #include "wx/univ/colschem.h"
#if wxUSE_GAUGE
#include "wx/gauge.h"
#endif
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@@ -24,12 +24,12 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #if wxUSE_GAUGE
#endif //WX_PRECOMP
#include "wx/gauge.h" #include "wx/gauge.h"
#if wxUSE_GAUGE #ifndef WX_PRECOMP
#endif //WX_PRECOMP
#include "wx/univ/renderer.h" #include "wx/univ/renderer.h"

View File

@@ -18,12 +18,15 @@
#if wxUSE_XRC && wxUSE_GAUGE #if wxUSE_XRC && wxUSE_GAUGE
#include "wx/xrc/xh_gauge.h" #include "wx/xrc/xh_gauge.h"
#include "wx/gauge.h"
#ifndef WX_PRECOMP
#include "wx/gauge.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxGaugeXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxGaugeXmlHandler, wxXmlResourceHandler)
wxGaugeXmlHandler::wxGaugeXmlHandler() wxGaugeXmlHandler::wxGaugeXmlHandler()
: wxXmlResourceHandler() :wxXmlResourceHandler()
{ {
XRC_ADD_STYLE(wxGA_HORIZONTAL); XRC_ADD_STYLE(wxGA_HORIZONTAL);
XRC_ADD_STYLE(wxGA_VERTICAL); XRC_ADD_STYLE(wxGA_VERTICAL);