mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-16 14:15:50 -06:00
fix deprecated warning
This commit is contained in:
parent
f8b017ad45
commit
2d7ac600c0
25 changed files with 402 additions and 405 deletions
|
|
@ -1084,7 +1084,6 @@ long ctlSQLBox::SelectQuery(int startposition)
|
|||
wxChar nextch = GetCharAt(pos);
|
||||
int st = GetStyleAt(pos - 1);
|
||||
int endPos = GetTextLength();
|
||||
int match;
|
||||
int pend=endPos;
|
||||
int pstart=0;
|
||||
|
||||
|
|
@ -1646,8 +1645,8 @@ CharacterRange ctlSQLBox::RegexFindText(int minPos, int maxPos, const wxString &
|
|||
wxWX2MBbuf buf = text.mb_str(wxConvUTF8);
|
||||
ft.lpstrText = (char *)(const char *)buf;
|
||||
|
||||
//<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> wx 2.8.12
|
||||
if (SendMsg(2150, wxSTC_FIND_REGEXP, (long)&ft) == -1)
|
||||
//
|
||||
if (SendMsg(2150, wxSTC_FIND_REGEXP, (LONG_PTR)&ft) == -1)
|
||||
{
|
||||
ft.chrgText.cpMin = -1;
|
||||
ft.chrgText.cpMax = -1;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void ctlSQLGrid::setresizedpi() {
|
|||
SetDefaultCellFont(fntCells);
|
||||
// Set labels font
|
||||
wxFont fntLabel(settings->GetSystemFont());
|
||||
fntLabel.SetWeight(wxBOLD);
|
||||
fntLabel.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
SetLabelFont(fntLabel);
|
||||
SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE);
|
||||
SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_TOP);
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ void ctlTree::DrawDbName(const wxTreeItemId& item) {
|
|||
if (s) {
|
||||
if (!(s->GetColour().IsEmpty())) {
|
||||
c=s->GetColour();
|
||||
dc.SetBrush(wxBrush(c, wxSOLID));
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(c));
|
||||
} else
|
||||
dc.SetBrush(*wxYELLOW_BRUSH);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ void ExplainText::OnPaint(wxPaintEvent &ev)
|
|||
|
||||
wxFont stdFont = settings->GetSystemFont();
|
||||
wxFont boldFont = stdFont;
|
||||
boldFont.SetWeight(wxBOLD);
|
||||
boldFont.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
|
||||
int x = GetCharHeight() / 2;
|
||||
int y = GetCharHeight() / 2;
|
||||
|
|
|
|||
|
|
@ -536,8 +536,8 @@ void ExplainLine::OnDraw(wxDC &dc)
|
|||
{
|
||||
if (m_lineControlPoints)
|
||||
{
|
||||
dc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxSOLID));
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(*wxLIGHT_GREY, wxSOLID));
|
||||
dc.SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(*wxLIGHT_GREY, wxBRUSHSTYLE_SOLID));
|
||||
|
||||
wxPoint *points = new wxPoint[11];
|
||||
wxRealPoint *point0 = (wxRealPoint *) m_lineControlPoints->Item(0)->GetData();
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ dlgMainConfig::dlgMainConfig(pgFrame *parent, pgSettingItem *_item) :
|
|||
txtComment->SetValue(item->newLine->comment);
|
||||
|
||||
wxFont fntLabel = stName->GetFont();
|
||||
fntLabel.SetWeight(wxBOLD);
|
||||
fntLabel.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
stName->SetFont(fntLabel);
|
||||
stName->SetLabel(item->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ void dlgProJob::OnRemove(wxCommandEvent& ev) {
|
|||
|
||||
void dlgProJob::OnChangeName(wxCommandEvent &ev)
|
||||
{
|
||||
bool relocatable;
|
||||
|
||||
// add all versions
|
||||
//cbVersion->Clear();
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ void frmMain::OnShortCut(wxCommandEvent& event)
|
|||
bool add = false;
|
||||
if (select_shortcut.IsEmpty()) return;
|
||||
|
||||
if (select_shortcut.StartsWith("@") > 0) {
|
||||
if (select_shortcut.StartsWith("@")) {
|
||||
select_shortcut = select_shortcut.substr(4);
|
||||
path = select_shortcut.SubString(1, select_shortcut.Length() - 1);
|
||||
add = true;
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
|
|||
// btnModeTransaction->Enable(true);
|
||||
wxFont stdFont = settings->GetSystemFont();
|
||||
wxFont boldFont = stdFont;
|
||||
boldFont.SetWeight(wxBOLD);
|
||||
boldFont.SetWeight(wxFONTWEIGHT_BOLD);
|
||||
btnModeTransaction->SetFont(boldFont);
|
||||
if (settings->GetAutoCommit())
|
||||
btnModeTransaction->SetLabel("A");
|
||||
|
|
|
|||
|
|
@ -1286,7 +1286,6 @@ void reportCompareFactory::GetExpandedChildNodes(wxTreeItemId node, wxArrayStrin
|
|||
else child = browser->GetFirstChild(node, cookie);
|
||||
pgObject *obj;
|
||||
wxString path;
|
||||
time_t tmp;
|
||||
int size=expandedNodes.Count();
|
||||
while (child.IsOk())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -223,22 +223,22 @@ void wxGridCellComboBoxRenderer::Draw(wxGrid &grid, wxGridCellAttr &attr, wxDC &
|
|||
|
||||
// Draw 3-d button
|
||||
wxColour colourBackGround = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
|
||||
dc.SetBrush(wxBrush(colourBackGround, wxSOLID));
|
||||
dc.SetPen(wxPen(colourBackGround, 1, wxSOLID));
|
||||
dc.SetBrush(wxBrush(colourBackGround, wxBRUSHSTYLE_SOLID));
|
||||
dc.SetPen(wxPen(colourBackGround, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawRectangle(rectButton);
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetLeft(), rectButton.GetBottom(),
|
||||
rectButton.GetRight(), rectButton.GetBottom());
|
||||
dc.DrawLine(rectButton.GetRight(), rectButton.GetBottom(),
|
||||
rectButton.GetRight(), rectButton.GetTop() - 1);
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW),
|
||||
1, wxSOLID));
|
||||
1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetLeft() + 1, rectButton.GetBottom() - 1,
|
||||
rectButton.GetRight() - 1, rectButton.GetBottom() - 1);
|
||||
dc.DrawLine(rectButton.GetRight() - 1, rectButton.GetBottom() - 1,
|
||||
rectButton.GetRight() - 1, rectButton.GetTop());
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT),
|
||||
1, wxSOLID));
|
||||
1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetRight() - 2, rectButton.GetTop() + 1,
|
||||
rectButton.GetLeft() + 1, rectButton.GetTop() + 1);
|
||||
dc.DrawLine(rectButton.GetLeft() + 1, rectButton.GetTop() + 1,
|
||||
|
|
@ -252,12 +252,12 @@ void wxGridCellComboBoxRenderer::Draw(wxGrid &grid, wxGridCellAttr &attr, wxDC &
|
|||
rectButton.GetTop() + (rectButton.GetHeight() - nTriHeight) / 2);
|
||||
point[1] = wxPoint(point[0].x + nTriWidth - 1, point[0].y);
|
||||
point[2] = wxPoint(point[0].x + 3, point[0].y + nTriHeight - 1);
|
||||
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), wxSOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID));
|
||||
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), wxBRUSHSTYLE_SOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawPolygon(3, point);
|
||||
if (m_border == wxLAYOUT_TOP)
|
||||
{
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxDOT));
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
|
||||
dc.DrawLine(rectCell.GetRight(), rectCell.GetTop(),
|
||||
rectCell.GetLeft(), rectCell.GetTop());
|
||||
}
|
||||
|
|
@ -300,30 +300,30 @@ void wxGridCellButtonRenderer::Draw(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc
|
|||
return;
|
||||
|
||||
wxColour colourBackGround = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
|
||||
dc.SetBrush(wxBrush(colourBackGround, wxSOLID));
|
||||
dc.SetPen(wxPen(colourBackGround, 1, wxSOLID));
|
||||
dc.SetBrush(wxBrush(colourBackGround, wxBRUSHSTYLE_SOLID));
|
||||
dc.SetPen(wxPen(colourBackGround, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawRectangle(rectButton);
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetLeft(), rectButton.GetBottom(),
|
||||
rectButton.GetRight(), rectButton.GetBottom());
|
||||
dc.DrawLine(rectButton.GetRight(), rectButton.GetBottom(),
|
||||
rectButton.GetRight(), rectButton.GetTop() - 1);
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW),
|
||||
1, wxSOLID));
|
||||
1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetLeft() + 1, rectButton.GetBottom() - 1,
|
||||
rectButton.GetRight() - 1, rectButton.GetBottom() - 1);
|
||||
dc.DrawLine(rectButton.GetRight() - 1, rectButton.GetBottom() - 1,
|
||||
rectButton.GetRight() - 1, rectButton.GetTop());
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT),
|
||||
1, wxSOLID));
|
||||
1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(rectButton.GetRight() - 2, rectButton.GetTop() + 1,
|
||||
rectButton.GetLeft() + 1, rectButton.GetTop() + 1);
|
||||
dc.DrawLine(rectButton.GetLeft() + 1, rectButton.GetTop() + 1,
|
||||
rectButton.GetLeft() + 1, rectButton.GetBottom() - 1);
|
||||
|
||||
// Draw little plus symbol
|
||||
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), wxSOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID));
|
||||
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), wxBRUSHSTYLE_SOLID));
|
||||
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxPENSTYLE_SOLID));
|
||||
int nPlusWidth = 7;
|
||||
int nPlusHeight = 7;
|
||||
wxPoint point[4];
|
||||
|
|
@ -336,7 +336,7 @@ void wxGridCellButtonRenderer::Draw(wxGrid &grid, wxGridCellAttr &attr, wxDC &dc
|
|||
|
||||
if (m_border == wxLAYOUT_TOP)
|
||||
{
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxDOT));
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
|
||||
dc.DrawLine(rectCell.GetRight(), rectCell.GetTop(),
|
||||
rectCell.GetLeft(), rectCell.GetTop());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
// wxWindows headers
|
||||
#include <wx/grid.h>
|
||||
|
||||
#include <wx/brush.h>
|
||||
class GroupRows;
|
||||
|
||||
class ctlSQLGrid : public wxGrid
|
||||
|
|
@ -221,23 +221,23 @@ class CursorCellRenderer : public wxGridCellStringRenderer
|
|||
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
|
||||
|
||||
|
||||
dc.SetBrush( wxBrush(clr, wxSOLID) );
|
||||
dc.SetBrush( *wxTheBrushList->FindOrCreateBrush(clr));
|
||||
}
|
||||
else
|
||||
{
|
||||
wxColor color;
|
||||
color.Set(239, 228, 176);
|
||||
if (sPos = text.Find(wxT('\n')) != wxNOT_FOUND) {
|
||||
dc.SetBrush(wxBrush(color, wxSOLID));
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(color));
|
||||
multiline = true;
|
||||
}
|
||||
else
|
||||
dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(attr.GetBackgroundColour()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
|
||||
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
|
||||
}
|
||||
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const
|
||||
{
|
||||
if (item == wxNOT_FOUND) return;
|
||||
wxCoord w1, h1, w2, h2;
|
||||
wxCoord w1, h1;
|
||||
wxString ss = GetString(item);
|
||||
wxString src = viewText(ss);
|
||||
int pp = src.Find(fnd);
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,7 @@ void wxShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment
|
|||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
||||
|
||||
|
|
@ -1282,7 +1282,7 @@ void wxShape::OnBeginDragLeft(double x, double y, int keys, int attachment)
|
|||
// m_xpos = xx; m_ypos = yy;
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -3199,7 +3199,7 @@ wxPen wxShape::GetBackgroundPen()
|
|||
if (GetCanvas())
|
||||
{
|
||||
wxColour c = GetCanvas()->GetBackgroundColour();
|
||||
return wxPen(c, 1, wxSOLID);
|
||||
return wxPen(c, 1, wxPENSTYLE_SOLID);
|
||||
}
|
||||
return * g_oglWhiteBackgroundPen;
|
||||
}
|
||||
|
|
@ -3210,7 +3210,7 @@ wxBrush wxShape::GetBackgroundBrush()
|
|||
if (GetCanvas())
|
||||
{
|
||||
wxColour c = GetCanvas()->GetBackgroundColour();
|
||||
return wxBrush(c, wxSOLID);
|
||||
return wxBrush(c, wxBRUSHSTYLE_SOLID);
|
||||
}
|
||||
return * g_oglWhiteBackgroundBrush;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1284,7 +1284,7 @@ void wxShape::OnSizingDragLeft(wxControlPoint *pt, bool WXUNUSED(draw), double x
|
|||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -1418,7 +1418,7 @@ void wxShape::OnSizingBeginDragLeft(wxControlPoint *pt, double x, double y, int
|
|||
pt->sm_controlPointDragStartWidth = bound_x;
|
||||
pt->sm_controlPointDragStartHeight = bound_y;
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -1610,7 +1610,7 @@ void wxPolygonShape::OnSizingDragLeft(wxControlPoint *pt, bool WXUNUSED(draw), d
|
|||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -1662,7 +1662,7 @@ void wxPolygonShape::OnSizingBeginDragLeft(wxControlPoint *pt, double x, double
|
|||
|
||||
if (ppt->m_originalDistance == 0.0) ppt->m_originalDistance = (double) 0.0001;
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -1746,7 +1746,7 @@ wxShapeRegion::wxShapeRegion()
|
|||
m_regionName = wxEmptyString;
|
||||
m_textColour = wxT("BLACK");
|
||||
m_penColour = wxT("BLACK");
|
||||
m_penStyle = wxSOLID;
|
||||
m_penStyle = wxPENSTYLE_SOLID;
|
||||
m_actualPenObject = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -1873,7 +1873,7 @@ wxPen *wxShapeRegion::GetActualPen()
|
|||
if (!m_penColour) return NULL;
|
||||
if (m_penColour == wxT("Invisible"))
|
||||
return NULL;
|
||||
m_actualPenObject = wxThePenList->FindOrCreatePen(m_penColour, 1, m_penStyle);
|
||||
m_actualPenObject = wxThePenList->FindOrCreatePen(m_penColour, 1, (wxPenStyle) m_penStyle);
|
||||
return m_actualPenObject;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ void wxShapeCanvas::OnPaint(wxPaintEvent &WXUNUSED(event))
|
|||
// Draws the background
|
||||
void wxShapeCanvas::DrawBackground(wxDC &dc, bool transformed)
|
||||
{
|
||||
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
|
||||
dc.SetBackground(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
|
||||
dc.Clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ void wxCompositeShape::OnDragLeft(bool WXUNUSED(draw), double x, double y, int W
|
|||
GetCanvas()->PrepareDC(dc);
|
||||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ void wxCompositeShape::OnBeginDragLeft(double x, double y, int WXUNUSED(keys), i
|
|||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
m_canvas->CaptureMouse();
|
||||
|
|
@ -334,7 +334,7 @@ void wxCompositeShape::Copy(wxShape ©)
|
|||
wxCompositeShape &compositeCopy = (wxCompositeShape &) copy;
|
||||
|
||||
// Associate old and new copies for compositeCopying constraints and division geometry
|
||||
oglObjectCopyMapping.Append((long)this, &compositeCopy);
|
||||
oglObjectCopyMapping.Append((LONG_PTR)this, &compositeCopy);
|
||||
|
||||
// Copy the children
|
||||
wxNode *node = m_children.GetFirst();
|
||||
|
|
@ -352,7 +352,7 @@ void wxCompositeShape::Copy(wxShape ©)
|
|||
if (m_divisions.Member(object))
|
||||
compositeCopy.m_divisions.Append(newObject);
|
||||
|
||||
oglObjectCopyMapping.Append((long)object, newObject);
|
||||
oglObjectCopyMapping.Append((LONG_PTR)object, newObject);
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
|
@ -363,14 +363,14 @@ void wxCompositeShape::Copy(wxShape ©)
|
|||
{
|
||||
wxOGLConstraint *constraint = (wxOGLConstraint *)node->GetData();
|
||||
|
||||
wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((long)constraint->m_constrainingObject)->GetData());
|
||||
wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((LONG_PTR)constraint->m_constrainingObject)->GetData());
|
||||
|
||||
wxList newConstrainedList;
|
||||
wxNode *node2 = constraint->m_constrainedObjects.GetFirst();
|
||||
while (node2)
|
||||
{
|
||||
wxShape *constrainedObject = (wxShape *)node2->GetData();
|
||||
wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((long)constrainedObject)->GetData());
|
||||
wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((LONG_PTR)constrainedObject)->GetData());
|
||||
newConstrainedList.Append(newConstrained);
|
||||
node2 = node2->GetNext();
|
||||
}
|
||||
|
|
@ -393,19 +393,19 @@ void wxCompositeShape::Copy(wxShape ©)
|
|||
while (node)
|
||||
{
|
||||
wxDivisionShape *division = (wxDivisionShape *)node->GetData();
|
||||
wxNode *node1 = oglObjectCopyMapping.Find((long)division);
|
||||
wxNode *node1 = oglObjectCopyMapping.Find((LONG_PTR)division);
|
||||
wxNode *leftNode = NULL;
|
||||
wxNode *topNode = NULL;
|
||||
wxNode *rightNode = NULL;
|
||||
wxNode *bottomNode = NULL;
|
||||
if (division->GetLeftSide())
|
||||
leftNode = oglObjectCopyMapping.Find((long)division->GetLeftSide());
|
||||
leftNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetLeftSide());
|
||||
if (division->GetTopSide())
|
||||
topNode = oglObjectCopyMapping.Find((long)division->GetTopSide());
|
||||
topNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetTopSide());
|
||||
if (division->GetRightSide())
|
||||
rightNode = oglObjectCopyMapping.Find((long)division->GetRightSide());
|
||||
rightNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetRightSide());
|
||||
if (division->GetBottomSide())
|
||||
bottomNode = oglObjectCopyMapping.Find((long)division->GetBottomSide());
|
||||
bottomNode = oglObjectCopyMapping.Find((LONG_PTR)division->GetBottomSide());
|
||||
if (node1)
|
||||
{
|
||||
wxDivisionShape *newDivision = (wxDivisionShape *)node1->GetData();
|
||||
|
|
@ -1728,8 +1728,8 @@ void wxDivisionShape::PopupMenu(double x, double y)
|
|||
wxClientDC dc(GetCanvas());
|
||||
GetCanvas()->PrepareDC(dc);
|
||||
|
||||
int mouse_x = (int)(dc.LogicalToDeviceX((long)(x - x1 * unit_x)));
|
||||
int mouse_y = (int)(dc.LogicalToDeviceY((long)(y - y1 * unit_y)));
|
||||
int mouse_x = (int)(dc.LogicalToDeviceX((LONG_PTR)(x - x1 * unit_x)));
|
||||
int mouse_y = (int)(dc.LogicalToDeviceY((LONG_PTR)(y - y1 * unit_y)));
|
||||
|
||||
m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
|
||||
delete oglPopupDivisionMenu;
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ void wxDividedShapeControlPoint::OnDragLeft(bool WXUNUSED(draw), double WXUNUSED
|
|||
GetCanvas()->PrepareDC(dc);
|
||||
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
@ -602,7 +602,7 @@ void wxDividedShapeControlPoint::OnBeginDragLeft(double WXUNUSED(x), double y, i
|
|||
|
||||
wxDividedShape *dividedObject = (wxDividedShape *)m_shape;
|
||||
dc.SetLogicalFunction(OGLRBLF);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ void wxOpSetGDI::Do(wxDC &dc, double WXUNUSED(xoffset), double WXUNUSED(yoffset)
|
|||
// Need to construct a brush to match the outline pen's colour
|
||||
if (m_image->m_outlinePen)
|
||||
{
|
||||
wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxSOLID);
|
||||
wxBrush *br = wxTheBrushList->FindOrCreateBrush(m_image->m_outlinePen->GetColour(), wxBRUSHSTYLE_SOLID);
|
||||
if (br)
|
||||
dc.SetBrush(* br);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -919,7 +919,7 @@ void wxLineShape::OnDrawOutline(wxDC &dc, double WXUNUSED(x), double WXUNUSED(y)
|
|||
wxPen *old_pen = m_pen;
|
||||
wxBrush *old_brush = m_brush;
|
||||
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
SetPen(& dottedPen);
|
||||
SetBrush( (wxBrush *) wxTRANSPARENT_BRUSH );
|
||||
|
||||
|
|
@ -1152,10 +1152,10 @@ void wxLineShape::OnDraw(wxDC &dc)
|
|||
|
||||
// Problem with pen - if not a solid pen, does strange things
|
||||
// to the arrowhead. So make (get) a new pen that's solid.
|
||||
if (m_pen && (m_pen->GetStyle() != wxSOLID))
|
||||
if (m_pen && (m_pen->GetStyle() != wxPENSTYLE_DOT))
|
||||
{
|
||||
wxPen *solid_pen =
|
||||
wxThePenList->FindOrCreatePen(m_pen->GetColour(), 1, wxSOLID);
|
||||
wxThePenList->FindOrCreatePen(m_pen->GetColour(), 1, wxPENSTYLE_DOT);
|
||||
if (solid_pen)
|
||||
dc.SetPen(* solid_pen);
|
||||
}
|
||||
|
|
@ -2392,7 +2392,7 @@ wxLabelShape::wxLabelShape(wxLineShape *parent, wxShapeRegion *region, double w,
|
|||
{
|
||||
m_lineShape = parent;
|
||||
m_shapeRegion = region;
|
||||
SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxDOT));
|
||||
SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT));
|
||||
}
|
||||
|
||||
wxLabelShape::~wxLabelShape()
|
||||
|
|
|
|||
|
|
@ -527,14 +527,14 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
getshort(handle); // Y: 2 bytes
|
||||
long colorref = getint(handle); // COLORREF 4 bytes
|
||||
|
||||
int style;
|
||||
wxPenStyle style;
|
||||
if (msStyle == PS_DOT)
|
||||
style = wxDOT;
|
||||
style = wxPENSTYLE_DOT;
|
||||
else if (msStyle == PS_DASH)
|
||||
style = wxSHORT_DASH;
|
||||
style = wxPENSTYLE_SHORT_DASH;
|
||||
else if (msStyle == PS_NULL)
|
||||
style = wxTRANSPARENT;
|
||||
else style = wxSOLID;
|
||||
style = wxPENSTYLE_TRANSPARENT;
|
||||
else style = wxPENSTYLE_SOLID;
|
||||
|
||||
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
|
||||
rec->param1 = (long)wxThePenList->FindOrCreatePen(colour, x, style);
|
||||
|
|
@ -582,34 +582,34 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
// header)
|
||||
fread((void *)lfFacename, sizeof(char), (int)((2 * rdSize) - 18 - 6), handle);
|
||||
|
||||
int family;
|
||||
wxFontFamily family;
|
||||
if (lfPitchAndFamily & FF_MODERN)
|
||||
family = wxMODERN;
|
||||
family = wxFONTFAMILY_MODERN;
|
||||
else if (lfPitchAndFamily & FF_MODERN)
|
||||
family = wxMODERN;
|
||||
family = wxFONTFAMILY_MODERN;
|
||||
else if (lfPitchAndFamily & FF_ROMAN)
|
||||
family = wxROMAN;
|
||||
family = wxFONTFAMILY_ROMAN;
|
||||
else if (lfPitchAndFamily & FF_SWISS)
|
||||
family = wxSWISS;
|
||||
family = wxFONTFAMILY_SWISS;
|
||||
else if (lfPitchAndFamily & FF_DECORATIVE)
|
||||
family = wxDECORATIVE;
|
||||
family = wxFONTFAMILY_DECORATIVE;
|
||||
else
|
||||
family = wxDEFAULT;
|
||||
family = wxFONTFAMILY_DEFAULT;
|
||||
|
||||
int weight;
|
||||
wxFontWeight weight;
|
||||
if (lfWeight == 300)
|
||||
weight = wxLIGHT;
|
||||
weight = wxFONTWEIGHT_LIGHT;
|
||||
else if (lfWeight == 400)
|
||||
weight = wxNORMAL;
|
||||
weight = wxFONTWEIGHT_NORMAL;
|
||||
else if (lfWeight == 900)
|
||||
weight = wxBOLD;
|
||||
else weight = wxNORMAL;
|
||||
weight = wxFONTWEIGHT_BOLD;
|
||||
else weight = wxFONTWEIGHT_NORMAL;
|
||||
|
||||
int style;
|
||||
wxFontStyle style;
|
||||
if (lfItalic != 0)
|
||||
style = wxITALIC;
|
||||
style = wxFONTSTYLE_ITALIC;
|
||||
else
|
||||
style = wxNORMAL;
|
||||
style = wxFONTSTYLE_NORMAL;
|
||||
|
||||
// About how many pixels per inch???
|
||||
int logPixelsY = 100;
|
||||
|
|
@ -663,16 +663,16 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
}
|
||||
case BS_SOLID:
|
||||
default:
|
||||
style = wxSOLID;
|
||||
style = wxBRUSHSTYLE_SOLID;
|
||||
break;
|
||||
}
|
||||
if (msStyle == PS_DOT)
|
||||
style = wxDOT;
|
||||
style = wxPENSTYLE_DOT;
|
||||
else if (msStyle == PS_DASH)
|
||||
style = wxSHORT_DASH;
|
||||
style = wxPENSTYLE_SHORT_DASH;
|
||||
else if (msStyle == PS_NULL)
|
||||
style = wxTRANSPARENT;
|
||||
else style = wxSOLID;
|
||||
style = wxPENSTYLE_TRANSPARENT;
|
||||
else style = wxPENSTYLE_SOLID;
|
||||
|
||||
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
|
||||
rec->param1 = (long)wxTheBrushList->FindOrCreateBrush(colour, style);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ void wxDiagram::ShowAll(bool show)
|
|||
|
||||
void wxDiagram::DrawOutline(wxDC &dc, double x1, double y1, double x2, double y2)
|
||||
{
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxPENSTYLE_DOT);
|
||||
dc.SetPen(dottedPen);
|
||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ void wxOGLInitialize()
|
|||
{
|
||||
g_oglBullseyeCursor = new wxCursor(wxCURSOR_BULLSEYE);
|
||||
|
||||
g_oglNormalFont = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
g_oglNormalFont = new wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
|
||||
g_oglBlackPen = new wxPen(wxT("BLACK"), 1, wxSOLID);
|
||||
g_oglBlackPen = new wxPen(wxT("BLACK"), 1, wxPENSTYLE_SOLID);
|
||||
|
||||
g_oglWhiteBackgroundPen = new wxPen(wxT("WHITE"), 1, wxSOLID);
|
||||
g_oglTransparentPen = new wxPen(wxT("WHITE"), 1, wxTRANSPARENT);
|
||||
g_oglWhiteBackgroundBrush = new wxBrush(wxT("WHITE"), wxSOLID);
|
||||
g_oglBlackForegroundPen = new wxPen(wxT("BLACK"), 1, wxSOLID);
|
||||
g_oglWhiteBackgroundPen = new wxPen(wxT("WHITE"), 1, wxPENSTYLE_SOLID);
|
||||
g_oglTransparentPen = new wxPen(wxT("WHITE"), 1, wxPENSTYLE_TRANSPARENT);
|
||||
g_oglWhiteBackgroundBrush = new wxBrush(wxT("WHITE"), wxBRUSHSTYLE_SOLID);
|
||||
g_oglBlackForegroundPen = new wxPen(wxT("BLACK"), 1, wxPENSTYLE_SOLID);
|
||||
|
||||
OGLInitializeConstraintTypes();
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ void wxOGLCleanUp()
|
|||
|
||||
wxFont *oglMatchFont(int point_size)
|
||||
{
|
||||
wxFont *font = wxTheFontList->FindOrCreateFont(point_size, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
wxFont *font = wxTheFontList->FindOrCreateFont(point_size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
#if 0
|
||||
switch (point_size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -691,7 +691,7 @@ wxFont sysSettings::GetSQLFont()
|
|||
if (fontName.IsEmpty())
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
return wxFont(9, wxTELETYPE, wxNORMAL, wxNORMAL);
|
||||
return wxFont(9, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
#else
|
||||
#ifdef __WXGTK__
|
||||
return wxFont(10, wxTELETYPE, wxNORMAL, wxNORMAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue