wxColour(const char *) ctor related modifications

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-10-20 14:35:22 +00:00
parent 9c1f7241c0
commit e4a81a2e96
35 changed files with 222 additions and 533 deletions

View File

@@ -62,15 +62,6 @@ wxBrush::wxBrush( const wxColour &colour, int style )
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
wxBrush::wxBrush( const wxString &colourName, int style )
{
m_refData = new wxBrushRefData();
M_BRUSHDATA->m_style = style;
M_BRUSHDATA->m_colour = colourName;
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
}
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
{
m_refData = new wxBrushRefData();
@@ -161,12 +152,6 @@ void wxBrush::SetColour( const wxColour& col )
M_BRUSHDATA->m_colour = col;
}
void wxBrush::SetColour( const wxString& col )
{
Unshare();
M_BRUSHDATA->m_colour = col;
}
void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
{
Unshare();

View File

@@ -121,28 +121,6 @@ wxColour& wxColour::operator = ( const wxColour& col )
return *this;
}
wxColour& wxColour::operator = ( const wxString& colourName )
{
UnRef();
wxNode *node = (wxNode *) NULL;
if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
if (col) Ref( *col );
}
else
{
m_refData = new wxColourRefData();
if (!gdk_color_parse( colourName, &M_COLDATA->m_color ))
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
}
bool wxColour::operator == ( const wxColour& col )
{
return m_refData == col.m_refData;

View File

@@ -351,10 +351,14 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
{
wxASSERT( m_imageList != NULL );
wxBitmap *bmp = m_imageList->GetBitmap(imageId);
const wxBitmap *bmp = m_imageList->GetBitmap(imageId);
GdkPixmap *pixmap = bmp->GetPixmap();
GdkBitmap *mask = (GdkBitmap*) NULL;
if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap();
if ( bmp->GetMask() )
{
mask = bmp->GetMask()->GetBitmap();
}
GtkWidget *pixmapwid = gtk_pixmap_new (pixmap, mask );
gtk_box_pack_start(GTK_BOX(page->m_box), pixmapwid, FALSE, FALSE, 3);

View File

@@ -71,16 +71,6 @@ wxPen::wxPen( const wxColour &colour, int width, int style )
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::wxPen( const wxString &colourName, int width, int style )
{
m_refData = new wxPenRefData();
M_PENDATA->m_width = width;
M_PENDATA->m_style = style;
M_PENDATA->m_colour = colourName;
if (wxThePenList) wxThePenList->AddPen( this );
}
wxPen::wxPen( const wxPen& pen )
{
Ref( pen );
@@ -123,12 +113,6 @@ void wxPen::SetColour( const wxColour &colour )
M_PENDATA->m_colour = colour;
}
void wxPen::SetColour( const wxString &colourName )
{
Unshare();
M_PENDATA->m_colour = colourName;
}
void wxPen::SetColour( int red, int green, int blue )
{
Unshare();