mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
fix deprecated warning
This commit is contained in:
parent
f8b017ad45
commit
2d7ac600c0
25 changed files with 402 additions and 405 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue