X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f97c985452b20a8c2f0bbfb1d0275298bf09fb45..35c9d9582be4ebea40251378e95fdbbfe6b8ce73:/utils/ogl/src/basic.cpp?ds=sidebyside diff --git a/utils/ogl/src/basic.cpp b/utils/ogl/src/basic.cpp index 1dff73fedc..4faa132925 100644 --- a/utils/ogl/src/basic.cpp +++ b/utils/ogl/src/basic.cpp @@ -24,9 +24,7 @@ #include #endif -#ifdef PROLOGIO #include -#endif #if wxUSE_IOSTREAMH #include @@ -177,6 +175,12 @@ void wxShapeEvtHandler::OnLeftClick(double x, double y, int keys, int attachment m_previousHandler->OnLeftClick(x, y, keys, attachment); } +void wxShapeEvtHandler::OnLeftDoubleClick(double x, double y, int keys, int attachment) +{ + if (m_previousHandler) + m_previousHandler->OnLeftDoubleClick(x, y, keys, attachment); +} + void wxShapeEvtHandler::OnRightClick(double x, double y, int keys, int attachment) { if (m_previousHandler) @@ -293,11 +297,11 @@ wxShape::wxShape(wxShapeCanvas *can) m_parent = NULL; m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT; m_shadowMode = SHADOW_NONE; - m_shadowOffsetX = 6.0; - m_shadowOffsetY = 6.0; + m_shadowOffsetX = 6; + m_shadowOffsetY = 6; m_shadowBrush = wxBLACK_BRUSH; - m_textMarginX = 5.0; - m_textMarginY = 5.0; + m_textMarginX = 5; + m_textMarginY = 5; m_regionName = "0"; m_centreResize = TRUE; m_maintainAspectRatio = FALSE; @@ -1821,8 +1825,8 @@ void wxShape::WriteRegions(wxExpr *clause) // region1 = (regionName regionText x y width height minWidth minHeight proportionX proportionY // formatMode fontSize fontFamily fontStyle fontWeight textColour) wxExpr *regionExpr = new wxExpr(wxExprList); - regionExpr->Append(new wxExpr(wxExprString, (region->m_regionName ? region->m_regionName : ""))); - regionExpr->Append(new wxExpr(wxExprString, (region->m_regionText ? region->m_regionText : ""))); + regionExpr->Append(new wxExpr(wxExprString, region->m_regionName)); + regionExpr->Append(new wxExpr(wxExprString, region->m_regionText)); regionExpr->Append(new wxExpr(region->m_x)); regionExpr->Append(new wxExpr(region->m_y)); @@ -1840,10 +1844,10 @@ void wxShape::WriteRegions(wxExpr *clause) regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetFamily() : wxDEFAULT))); regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetStyle() : wxDEFAULT))); regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetWeight() : wxNORMAL))); - regionExpr->Append(new wxExpr(wxExprString, region->m_textColour ? region->m_textColour : "BLACK")); + regionExpr->Append(new wxExpr(wxExprString, region->m_textColour)); // New members for pen colour/style - regionExpr->Append(new wxExpr(wxExprString, region->m_penColour ? region->m_penColour : "BLACK")); + regionExpr->Append(new wxExpr(wxExprString, region->m_penColour)); regionExpr->Append(new wxExpr((long)region->m_penStyle)); // Formatted text: @@ -1903,8 +1907,8 @@ void wxShape::ReadAttributes(wxExpr *clause) else if (string_expr->Type() == wxExprList) { wxExpr *first = string_expr->value.first; - wxExpr *second = first ? first->next : NULL; - wxExpr *third = second ? second->next : NULL; + wxExpr *second = first ? first->next : (wxExpr*) NULL; + wxExpr *third = second ? second->next : (wxExpr*) NULL; if (first && second && third && (first->Type() == wxExprReal || first->Type() == wxExprInteger) && @@ -2072,7 +2076,7 @@ void wxShape::ReadRegions(wxExpr *clause) m_formatted = TRUE; // Assume text is formatted unless we prove otherwise - while (regionExpr = clause->AttributeValue(regionNameBuf)) + while ((regionExpr = clause->AttributeValue(regionNameBuf))) { /* * Get the region information @@ -2196,8 +2200,8 @@ void wxShape::ReadRegions(wxExpr *clause) else if (string_expr->Type() == wxExprList) { wxExpr *first = string_expr->value.first; - wxExpr *second = first ? first->next : NULL; - wxExpr *third = second ? second->next : NULL; + wxExpr *second = first ? first->next : (wxExpr*) NULL; + wxExpr *third = second ? second->next : (wxExpr*) NULL; if (first && second && third && (first->Type() == wxExprReal || first->Type() == wxExprInteger) && @@ -3152,7 +3156,7 @@ void wxShape::OnDrawBranches(wxDC& dc, int attachment, bool erase) GetBranchingAttachmentPoint(attachment, i, pt, stemPt); dc.DrawLine((long) stemPt.x, (long) stemPt.y, (long) pt.x, (long) pt.y); - if (GetBranchStyle() & BRANCHING_ATTACHMENT_BLOB) + if ((GetBranchStyle() & BRANCHING_ATTACHMENT_BLOB) && (count > 1)) { long blobSize=6; // dc.DrawEllipse((long) (stemPt.x + 0.5 - (blobSize/2.0)), (long) (stemPt.y + 0.5 - (blobSize/2.0)), blobSize, blobSize);