wxColour source cleaning. Corrections to 'const unsigned char' within wxColour docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6e21a3db8a
commit
edc536d358
@ -1,3 +1,14 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: colour.tex
|
||||
%% Purpose: wxColour docs
|
||||
%% Author:
|
||||
%% Modified by:
|
||||
%% Created:
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWidgets
|
||||
%% License: wxWindows license
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{\class{wxColour}}\label{wxcolour}
|
||||
|
||||
A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values,
|
||||
@ -47,7 +58,7 @@ wxLIGHT\_GREY}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
\func{}{wxColour}{\param{unsigned char}{ red}, \param{unsigned char}{ green}, \param{unsigned char}{ blue}}
|
||||
|
||||
Constructs a colour from red, green and blue values.
|
||||
|
||||
@ -125,7 +136,7 @@ Returns the red intensity.
|
||||
|
||||
\membersection{wxColour::Set}\label{wxcolourset}
|
||||
|
||||
\func{void}{Set}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
\func{void}{Set}{\param{unsigned char}{ red}, \param{unsigned char}{ green}, \param{unsigned char}{ blue}}
|
||||
|
||||
Sets the RGB intensity values.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/cocoa/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
@ -21,12 +21,18 @@
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { Init(); }
|
||||
|
||||
// from RGB
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
: m_cocoaNSColor(NULL)
|
||||
{ Set(red,green,blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB )
|
||||
: m_cocoaNSColor(NULL)
|
||||
{ Set(colRGB); }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/gtk/colour.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -34,10 +34,16 @@ class WXDLLIMPEXP_CORE wxColour;
|
||||
class WXDLLIMPEXP_CORE wxColour: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { }
|
||||
|
||||
// Construct from RGB
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue );
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// Implicit conversion from the colour name
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/gtk/colour.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -34,10 +34,16 @@ class WXDLLIMPEXP_CORE wxColour;
|
||||
class WXDLLIMPEXP_CORE wxColour: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { }
|
||||
|
||||
// Construct from RGB
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue );
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// Implicit conversion from the colour name
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/mac/carbon/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -19,12 +19,17 @@
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { Init(); }
|
||||
// from RGB
|
||||
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB )
|
||||
{ Set(colRGB); }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/mac/classic/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -19,12 +19,17 @@
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { Init(); }
|
||||
// from RGB
|
||||
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB )
|
||||
{ Set(colRGB); }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/mgl/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -18,12 +18,17 @@
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour();
|
||||
// from RGB
|
||||
|
||||
// from separate RGB
|
||||
wxColour(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour(unsigned long colRGB) { Set(colRGB); }
|
||||
|
||||
// implicit conversion from the colour name
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/motif/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -20,12 +20,17 @@ class WXDLLEXPORT wxColour : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
public:
|
||||
// ctors
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour();
|
||||
// from RGB
|
||||
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// implicit conversion from the colour name
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/os2/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@ -18,56 +18,36 @@
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Ctors
|
||||
//
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
//
|
||||
// Default
|
||||
//
|
||||
// default
|
||||
wxColour();
|
||||
|
||||
//
|
||||
// from RGB
|
||||
//
|
||||
wxColour( unsigned char cRed
|
||||
,unsigned char cGreen
|
||||
,unsigned char cBlue
|
||||
);
|
||||
// from separate RGB
|
||||
wxColour( unsigned char cRed, unsigned char cGreen, unsigned char cBlue );
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
//
|
||||
// Implicit conversion from the colour name
|
||||
//
|
||||
wxColour(const wxString& rColourName) { InitFromName(rColourName); }
|
||||
wxColour(const wxChar *zColourName) { InitFromName(zColourName); }
|
||||
|
||||
//
|
||||
// Copy ctors and assignment operators
|
||||
//
|
||||
wxColour(const wxColour& rCol);
|
||||
wxColour(const wxColour* pCol);
|
||||
wxColour&operator = (const wxColour& rCol);
|
||||
|
||||
//
|
||||
// Dtor
|
||||
//
|
||||
~wxColour();
|
||||
|
||||
//
|
||||
// Set functions
|
||||
//
|
||||
void Set( unsigned char cRed
|
||||
,unsigned char cGreen
|
||||
,unsigned char cBlue
|
||||
);
|
||||
void Set(unsigned long lColRGB)
|
||||
void Set( unsigned char cRed, unsigned char cGreen, unsigned char cBlue);
|
||||
void Set( unsigned long lColRGB)
|
||||
{
|
||||
//
|
||||
// We don't need to know sizeof(long) here because we assume that the three
|
||||
// least significant bytes contain the R, G and B values
|
||||
//
|
||||
Set( (unsigned char)lColRGB
|
||||
,(unsigned char)(lColRGB >> 8)
|
||||
,(unsigned char)(lColRGB >> 16)
|
||||
@ -78,18 +58,14 @@ public:
|
||||
InitFromName(rsColour);
|
||||
}
|
||||
|
||||
//
|
||||
// Accessors
|
||||
//
|
||||
bool Ok(void) const {return m_bIsInit; }
|
||||
|
||||
unsigned char Red(void) const { return m_cRed; }
|
||||
unsigned char Green(void) const { return m_cGreen; }
|
||||
unsigned char Blue(void) const { return m_cBlue; }
|
||||
|
||||
//
|
||||
// Comparison
|
||||
//
|
||||
bool operator == (const wxColour& rColour) const
|
||||
{
|
||||
return (m_bIsInit == rColour.m_bIsInit
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Name: wx/x11/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart, Robert Roebling
|
||||
// Modified by:
|
||||
@ -36,10 +36,16 @@ class WXDLLIMPEXP_CORE wxColour;
|
||||
class WXDLLEXPORT wxColour: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { }
|
||||
|
||||
// Construct from RGB
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue );
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// Implicit conversion from the colour name
|
||||
@ -97,4 +103,3 @@ private:
|
||||
#endif
|
||||
|
||||
// _WX_COLOUR_H_
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.mm
|
||||
// Name: src/cococa/colour.mm
|
||||
// Purpose: wxColour class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
@ -100,4 +100,3 @@ void wxColour::Set( WX_NSColor aColor )
|
||||
m_green = (wxUint8) ([rgbColor greenComponent] * 255.0);
|
||||
m_blue = (wxUint8) ([rgbColor blueComponent] * 255.0);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/gtk/colour.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/gtk/colour.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/mac/carbon/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/mac/classic/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/mgl/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/msw/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -123,4 +123,3 @@ void wxColour::Set(unsigned char r, unsigned char g, unsigned char b)
|
||||
m_isInit = true;
|
||||
m_pixel = PALETTERGB(m_red, m_green, m_blue);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/os2/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
|
@ -106,5 +106,8 @@ wxColour::~wxColour()
|
||||
|
||||
void wxColour::Set(unsigned char r, unsigned char g, unsigned char b)
|
||||
{
|
||||
m_red = r;
|
||||
m_green = g;
|
||||
m_blue = b;
|
||||
m_isInit = true;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.cpp
|
||||
// Name: src/x11/colour.cpp
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart, Robert Roebling
|
||||
// Modified by:
|
||||
|
Loading…
Reference in New Issue
Block a user