#include "wx/imaglist.h"
#include "wx/tokenzr.h"
-#ifdef wxHAVE_RAW_BITMAP
+#ifdef wxHAS_RAW_BITMAP
#include "wx/rawbmp.h"
#endif
void SurfaceImpl::PenColour(ColourAllocated fore) {
- hdc->SetPen(wxPen(wxColourFromCA(fore), 1, wxSOLID));
+ hdc->SetPen(wxPen(wxColourFromCA(fore)));
}
void SurfaceImpl::BrushColour(ColourAllocated back) {
- hdc->SetBrush(wxBrush(wxColourFromCA(back), wxSOLID));
+ hdc->SetBrush(wxBrush(wxColourFromCA(back)));
}
void SurfaceImpl::SetFont(Font &font_) {
if (((SurfaceImpl&)surfacePattern).bitmap)
br = wxBrush(*((SurfaceImpl&)surfacePattern).bitmap);
else // Something is wrong so display in red
- br = wxBrush(*wxRED, wxSOLID);
+ br = wxBrush(*wxRED);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->SetBrush(br);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
ColourAllocated fill, int alphaFill,
ColourAllocated outline, int alphaOutline,
int /*flags*/) {
-#ifdef wxHAVE_RAW_BITMAP
+#ifdef wxHAS_RAW_BITMAP
// TODO: do something with cornerSize
wxUnusedVar(cornerSize);
-
+
int x, y;
wxRect r = wxRectFromPRectangle(rc);
wxBitmap bmp(r.width, r.height, 32);
p.Green() = wxPy_premultiply(green, alphaFill);
p.Blue() = wxPy_premultiply(blue, alphaFill);
p.Alpha() = alphaFill;
- ++p;
+ ++p;
}
}
p.Red() = wxPy_premultiply(red, alphaOutline);
p.Green() = wxPy_premultiply(green, alphaOutline);
p.Blue() = wxPy_premultiply(blue, alphaOutline);
- p.Alpha() = alphaOutline;
+ p.Alpha() = alphaOutline;
p.MoveTo(pixData, x, r.height-1);
p.Red() = wxPy_premultiply(red, alphaOutline);
p.Green() = wxPy_premultiply(green, alphaOutline);
p.Blue() = wxPy_premultiply(blue, alphaOutline);
- p.Alpha() = alphaOutline;
+ p.Alpha() = alphaOutline;
}
for (y=0; y<r.height; y++) {
p.Red() = wxPy_premultiply(red, alphaOutline);
p.Green() = wxPy_premultiply(green, alphaOutline);
p.Blue() = wxPy_premultiply(blue, alphaOutline);
- p.Alpha() = alphaOutline;
+ p.Alpha() = alphaOutline;
p.MoveTo(pixData, r.width-1, y);
p.Red() = wxPy_premultiply(red, alphaOutline);
p.Green() = wxPy_premultiply(green, alphaOutline);
p.Blue() = wxPy_premultiply(blue, alphaOutline);
- p.Alpha() = alphaOutline;
+ p.Alpha() = alphaOutline;
}
-
+
// Draw the bitmap
hdc->DrawBitmap(bmp, r.x, r.y, true);
SetFont(font);
hdc->SetTextForeground(wxColourFromCA(fore));
- hdc->SetBackgroundMode(wxTRANSPARENT);
+ hdc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
// ybase is where the baseline should be, but wxWin uses the upper left
// corner, so I need to calculate the real position for the text...
hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent);
- hdc->SetBackgroundMode(wxSOLID);
+ hdc->SetBackgroundMode(wxBRUSHSTYLE_SOLID);
}
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
wxPopupWindow(parent, wxBORDER_NONE)
{
-
+
SetBackgroundColour(*wxBLACK); // for our simple border
lv = new wxSTCListBox(parent, id, wxPoint(-50,-50), wxDefaultSize,
wxFRAME_NO_TASKBAR
| wxFRAME_FLOAT_ON_PARENT
#ifdef __WXMAC__
- | wxPOPUP_WINDOW
+ | wxPOPUP_WINDOW
| wxNO_BORDER
#else
| wxSIMPLE_BORDER
lv->SetFocus();
Hide();
- }
+ }
// On OSX and (possibly others) there can still be pending
if (frame)
frame->Raise();
}
-
+
virtual void DoSetSize(int x, int y,
int width, int height,
void ListBoxImpl::Append(const wxString& text, int type) {
long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
- ling idx = -1;
+ long idx = -1;
GETLB(id)->SetItem(itemID, 1, text);
maxStrWidth = wxMax(maxStrWidth, text.length());
if (type != -1) {
void *lParam) {
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
- return stc->SendMsg(msg, wParam, (long)lParam);
+ return stc->SendMsg(msg, wParam, (wxIntPtr)lParam);
}