// Created: 12/07/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
if (m_pen) dc.SetPen(* m_pen);
- if (m_textColour) dc.SetTextForeground(* m_textColour);
+ dc.SetTextForeground(m_textColour);
#ifdef __WXMSW__
// For efficiency, don't do this under X - doesn't make
if (!formatted)
{
FormatRegionText();
- formatted = TRUE;
+ formatted = true;
}
*/
if (GetDisableLabel()) return;
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
dc.SetFont(* region->GetFont());
- dc.SetTextForeground(* region->GetActualColourObject());
+ dc.SetTextForeground(region->GetActualColourObject());
double proportion =
region->m_regionProportionY < 0.0 ? defaultProportion : region->m_regionProportionY;
// Left or right.
else
{
- int i = 0;
- bool isLeft = FALSE;
- if (attachment < (n+1))
- {
- i = attachment-1;
- isLeft = FALSE;
- }
- else
- {
- i = (totalNumberAttachments - attachment - 1);
- isLeft = TRUE;
- }
+ bool isLeft = !(attachment < (n+1));
+ int i = (isLeft) ? (totalNumberAttachments - attachment - 1) : (attachment-1);
wxNode *node = GetRegions().Item(i);
if (node)
{
{
*x = m_xpos;
*y = m_ypos;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
int wxDividedShape::GetNumberOfAttachments() const
return wxShape::AttachmentIsValid(attachment);
}
else if (attachment >= 0)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
void wxDividedShape::Copy(wxShape& copy)
wxEndBusyCursor();
- dialog->Show(TRUE);
+ dialog->Show(true);
node = GetRegions().GetFirst();
i = 0;
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
if (region->GetText())
{
- wxChar *s = copystring(region->GetText());
- dividedObject->FormatText(dc, s, i);
- delete[] s;
+ wxString s(region->GetText());
+ dividedObject->FormatText(dc, s.c_str(), i);
}
node = node->GetNext();
i++;