Pl_Editor: title block texts can be multiline (use" \n" : a '\' followed by a 'n' to create a new line inside a text)
Very minor code cleaning.
This commit is contained in:
commit
1ef311cd01
|
@ -509,13 +509,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
|
||||||
tmp << wxT( "OFF\n" );
|
tmp << wxT( "OFF\n" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tmp << wxT( " KICAD_GOST=" );
|
|
||||||
#ifdef KICAD_GOST
|
|
||||||
tmp << wxT( "ON\n" );
|
|
||||||
#else
|
|
||||||
tmp << wxT( "OFF\n" );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
|
tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
|
||||||
#ifdef USE_WX_GRAPHICS_CONTEXT
|
#ifdef USE_WX_GRAPHICS_CONTEXT
|
||||||
tmp << wxT( "ON\n" );
|
tmp << wxT( "ON\n" );
|
||||||
|
|
|
@ -63,7 +63,6 @@ const wxString PAGE_INFO::Custom( wxT( "User" ) );
|
||||||
#define MMsize( x, y ) wxSize( Mm2mils( x ), Mm2mils( y ) )
|
#define MMsize( x, y ) wxSize( Mm2mils( x ), Mm2mils( y ) )
|
||||||
|
|
||||||
// All MUST be defined as landscape.
|
// All MUST be defined as landscape.
|
||||||
// If IsGOST() is true, A4 is dynamically rotated later.
|
|
||||||
const PAGE_INFO PAGE_INFO::pageA4( MMsize( 297, 210 ), wxT( "A4" ), wxPAPER_A4 );
|
const PAGE_INFO PAGE_INFO::pageA4( MMsize( 297, 210 ), wxT( "A4" ), wxPAPER_A4 );
|
||||||
const PAGE_INFO PAGE_INFO::pageA3( MMsize( 420, 297 ), wxT( "A3" ), wxPAPER_A3 );
|
const PAGE_INFO PAGE_INFO::pageA3( MMsize( 420, 297 ), wxT( "A3" ), wxPAPER_A3 );
|
||||||
const PAGE_INFO PAGE_INFO::pageA2( MMsize( 594, 420 ), wxT( "A2" ), wxPAPER_A2 );
|
const PAGE_INFO PAGE_INFO::pageA2( MMsize( 594, 420 ), wxT( "A2" ), wxPAPER_A2 );
|
||||||
|
@ -127,16 +126,13 @@ inline void PAGE_INFO::updatePortrait()
|
||||||
|
|
||||||
|
|
||||||
PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSize aPaperId ) :
|
PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSize aPaperId ) :
|
||||||
m_type( aType ),
|
m_type( aType ), m_size( aSizeMils ), m_paper_id( aPaperId )
|
||||||
m_size( aSizeMils ),
|
|
||||||
m_paper_id( aPaperId )
|
|
||||||
{
|
{
|
||||||
updatePortrait();
|
updatePortrait();
|
||||||
|
|
||||||
// This constructor is protected, and only used by const PAGE_INFO's known
|
// This constructor is protected, and only used by const PAGE_INFO's known
|
||||||
// only to class implementation, so no further changes to "this" object are
|
// only to class implementation, so no further changes to "this" object are
|
||||||
// expected. Therefore we should also setMargin() again when copying this
|
// expected.
|
||||||
// object in SetType() so that a runtime IsGOST() change does not break.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,7 @@ void EDA_TEXT::drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC,
|
||||||
if( aFillMode == LINE )
|
if( aFillMode == LINE )
|
||||||
width = 0;
|
width = 0;
|
||||||
|
|
||||||
if( aDrawMode != -1 )
|
if( aDrawMode != UNSPECIFIED_DRAWMODE )
|
||||||
GRSetDrawMode( aDC, aDrawMode );
|
GRSetDrawMode( aDC, aDrawMode );
|
||||||
|
|
||||||
// Draw text anchor, if requested
|
// Draw text anchor, if requested
|
||||||
|
|
|
@ -437,7 +437,7 @@ WORKSHEET_DATAITEM_TEXT::WORKSHEET_DATAITEM_TEXT( const wxChar* aTextBase ) :
|
||||||
m_Hjustify = GR_TEXT_HJUSTIFY_LEFT;
|
m_Hjustify = GR_TEXT_HJUSTIFY_LEFT;
|
||||||
m_Vjustify = GR_TEXT_VJUSTIFY_CENTER;
|
m_Vjustify = GR_TEXT_VJUSTIFY_CENTER;
|
||||||
m_Orient = 0.0;
|
m_Orient = 0.0;
|
||||||
m_LineWidth = 0.0; // 0.0 means use Dd
|
m_LineWidth = 0.0; // 0.0 means use default value
|
||||||
}
|
}
|
||||||
|
|
||||||
void WORKSHEET_DATAITEM_TEXT::TransfertSetupToGraphicText( WS_DRAW_ITEM_TEXT* aGText )
|
void WORKSHEET_DATAITEM_TEXT::TransfertSetupToGraphicText( WS_DRAW_ITEM_TEXT* aGText )
|
||||||
|
|
|
@ -96,49 +96,7 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
if( item->GetParent() && item->GetParent()->IsSelected() )
|
if( item->GetParent() && item->GetParent()->IsSelected() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch( item->GetType() )
|
item->DrawWsItem( aClipBox, aDC );
|
||||||
{
|
|
||||||
case WS_DRAW_ITEM_BASE::wsg_line:
|
|
||||||
{
|
|
||||||
WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item;
|
|
||||||
GRLine( aClipBox, aDC,
|
|
||||||
line->GetStart(), line->GetEnd(),
|
|
||||||
line->GetPenWidth(), line->GetColor() );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WS_DRAW_ITEM_BASE::wsg_rect:
|
|
||||||
{
|
|
||||||
WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item;
|
|
||||||
GRRect( aClipBox, aDC,
|
|
||||||
rect->GetStart().x, rect->GetStart().y,
|
|
||||||
rect->GetEnd().x, rect->GetEnd().y,
|
|
||||||
rect->GetPenWidth(), rect->GetColor() );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WS_DRAW_ITEM_BASE::wsg_text:
|
|
||||||
{
|
|
||||||
WS_DRAW_ITEM_TEXT* text = (WS_DRAW_ITEM_TEXT*) item;
|
|
||||||
DrawGraphicText( aClipBox, aDC, text->GetTextPosition(),
|
|
||||||
text->GetColor(), text->GetText(),
|
|
||||||
text->GetOrientation(), text->GetSize(),
|
|
||||||
text->GetHorizJustify(), text->GetVertJustify(),
|
|
||||||
text->GetPenWidth(), text->IsItalic(), text->IsBold() );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WS_DRAW_ITEM_BASE::wsg_poly:
|
|
||||||
{
|
|
||||||
WS_DRAW_ITEM_POLYGON* poly = (WS_DRAW_ITEM_POLYGON*) item;
|
|
||||||
GRPoly( aClipBox, aDC,
|
|
||||||
poly->m_Corners.size(), &poly->m_Corners[0],
|
|
||||||
poly->IsFilled() ? FILLED_SHAPE : NO_FILL,
|
|
||||||
poly->GetPenWidth(),
|
|
||||||
poly->GetColor(), poly->GetColor() );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The selected items are drawn after (usually 0 or 1)
|
// The selected items are drawn after (usually 0 or 1)
|
||||||
|
@ -149,14 +107,13 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
if( !item->GetParent() || !item->GetParent()->IsSelected() )
|
if( !item->GetParent() || !item->GetParent()->IsSelected() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
item->DrawWsItem( aClipBox, aDC );
|
||||||
|
|
||||||
switch( item->GetType() )
|
switch( item->GetType() )
|
||||||
{
|
{
|
||||||
case WS_DRAW_ITEM_BASE::wsg_line:
|
case WS_DRAW_ITEM_BASE::wsg_line:
|
||||||
{
|
{
|
||||||
WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item;
|
WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item;
|
||||||
GRLine( aClipBox, aDC,
|
|
||||||
line->GetStart(), line->GetEnd(),
|
|
||||||
line->GetPenWidth(), line->GetColor() );
|
|
||||||
|
|
||||||
if( markerSize )
|
if( markerSize )
|
||||||
{
|
{
|
||||||
|
@ -169,10 +126,6 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
case WS_DRAW_ITEM_BASE::wsg_rect:
|
case WS_DRAW_ITEM_BASE::wsg_rect:
|
||||||
{
|
{
|
||||||
WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item;
|
WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item;
|
||||||
GRRect( aClipBox, aDC,
|
|
||||||
rect->GetStart().x, rect->GetStart().y,
|
|
||||||
rect->GetEnd().x, rect->GetEnd().y,
|
|
||||||
rect->GetPenWidth(), rect->GetColor() );
|
|
||||||
|
|
||||||
if( markerSize )
|
if( markerSize )
|
||||||
{
|
{
|
||||||
|
@ -185,11 +138,6 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
case WS_DRAW_ITEM_BASE::wsg_text:
|
case WS_DRAW_ITEM_BASE::wsg_text:
|
||||||
{
|
{
|
||||||
WS_DRAW_ITEM_TEXT* text = (WS_DRAW_ITEM_TEXT*) item;
|
WS_DRAW_ITEM_TEXT* text = (WS_DRAW_ITEM_TEXT*) item;
|
||||||
DrawGraphicText( aClipBox, aDC, text->GetTextPosition(),
|
|
||||||
text->GetColor(), text->GetText(),
|
|
||||||
text->GetOrientation(), text->GetSize(),
|
|
||||||
text->GetHorizJustify(), text->GetVertJustify(),
|
|
||||||
text->GetPenWidth(), text->IsItalic(), text->IsBold() );
|
|
||||||
|
|
||||||
if( markerSize )
|
if( markerSize )
|
||||||
drawMarker( aClipBox, aDC, text->GetTextPosition(),
|
drawMarker( aClipBox, aDC, text->GetTextPosition(),
|
||||||
|
@ -200,11 +148,6 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
case WS_DRAW_ITEM_BASE::wsg_poly:
|
case WS_DRAW_ITEM_BASE::wsg_poly:
|
||||||
{
|
{
|
||||||
WS_DRAW_ITEM_POLYGON* poly = (WS_DRAW_ITEM_POLYGON*) item;
|
WS_DRAW_ITEM_POLYGON* poly = (WS_DRAW_ITEM_POLYGON*) item;
|
||||||
GRPoly( aClipBox, aDC,
|
|
||||||
poly->m_Corners.size(), &poly->m_Corners[0],
|
|
||||||
poly->IsFilled() ? FILLED_SHAPE : NO_FILL,
|
|
||||||
poly->GetPenWidth(),
|
|
||||||
poly->GetColor(), poly->GetColor() );
|
|
||||||
|
|
||||||
if( markerSize )
|
if( markerSize )
|
||||||
{
|
{
|
||||||
|
@ -217,6 +160,25 @@ void WS_DRAW_ITEM_LIST::Draw( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WS_DRAW_ITEM_TEXT::WS_DRAW_ITEM_TEXT( WORKSHEET_DATAITEM* aParent,
|
||||||
|
wxString& aText, wxPoint aPos, wxSize aSize,
|
||||||
|
int aPenWidth, EDA_COLOR_T aColor,
|
||||||
|
bool aItalic, bool aBold ) :
|
||||||
|
WS_DRAW_ITEM_BASE( aParent, wsg_text, aColor ), EDA_TEXT( aText )
|
||||||
|
{
|
||||||
|
SetTextPosition( aPos );
|
||||||
|
SetSize( aSize );
|
||||||
|
SetThickness( aPenWidth );
|
||||||
|
SetItalic( aItalic );
|
||||||
|
SetBold( aBold );
|
||||||
|
}
|
||||||
|
|
||||||
|
void WS_DRAW_ITEM_TEXT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
|
{
|
||||||
|
Draw( aClipBox, aDC, wxPoint(0,0),
|
||||||
|
GetColor(), UNSPECIFIED_DRAWMODE, FILLED, UNSPECIFIED_COLOR );
|
||||||
|
}
|
||||||
|
|
||||||
// return true if the point aPosition is on the text
|
// return true if the point aPosition is on the text
|
||||||
bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition)
|
bool WS_DRAW_ITEM_TEXT::HitTest( const wxPoint& aPosition)
|
||||||
{
|
{
|
||||||
|
@ -236,6 +198,15 @@ bool WS_DRAW_ITEM_TEXT::HitTestStartPoint( const wxPoint& aPosition)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WS_DRAW_ITEM_POLYGON::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
|
{
|
||||||
|
GRPoly( aClipBox, aDC,
|
||||||
|
m_Corners.size(), &m_Corners[0],
|
||||||
|
IsFilled() ? FILLED_SHAPE : NO_FILL,
|
||||||
|
GetPenWidth(),
|
||||||
|
GetColor(), GetColor() );
|
||||||
|
}
|
||||||
|
|
||||||
// return true if the point aPosition is inside one of polygons
|
// return true if the point aPosition is inside one of polygons
|
||||||
#include <polygon_test_point_inside.h>
|
#include <polygon_test_point_inside.h>
|
||||||
bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition)
|
bool WS_DRAW_ITEM_POLYGON::HitTest( const wxPoint& aPosition)
|
||||||
|
@ -257,6 +228,14 @@ bool WS_DRAW_ITEM_POLYGON::HitTestStartPoint( const wxPoint& aPosition)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WS_DRAW_ITEM_RECT::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
|
{
|
||||||
|
GRRect( aClipBox, aDC,
|
||||||
|
GetStart().x, GetStart().y,
|
||||||
|
GetEnd().x, GetEnd().y,
|
||||||
|
GetPenWidth(), GetColor() );
|
||||||
|
}
|
||||||
|
|
||||||
// return true if the point aPosition is on the rect outline
|
// return true if the point aPosition is on the rect outline
|
||||||
bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition)
|
bool WS_DRAW_ITEM_RECT::HitTest( const wxPoint& aPosition)
|
||||||
{
|
{
|
||||||
|
@ -318,6 +297,12 @@ bool WS_DRAW_ITEM_RECT::HitTestEndPoint( const wxPoint& aPosition)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WS_DRAW_ITEM_LINE::DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC )
|
||||||
|
{
|
||||||
|
GRLine( aClipBox, aDC, GetStart(), GetEnd(),
|
||||||
|
GetPenWidth(), GetColor() );
|
||||||
|
}
|
||||||
|
|
||||||
// return true if the point aPosition is on the text
|
// return true if the point aPosition is on the text
|
||||||
bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition)
|
bool WS_DRAW_ITEM_LINE::HitTest( const wxPoint& aPosition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,6 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define milsTomm (25.4/1000)
|
#define milsTomm (25.4/1000)
|
||||||
#define mmTomils (1000/25.4)
|
|
||||||
|
|
||||||
m_titleBlock = &aTitleBlock;
|
m_titleBlock = &aTitleBlock;
|
||||||
m_paperFormat = &aPageInfo.GetType();
|
m_paperFormat = &aPageInfo.GetType();
|
||||||
|
@ -146,11 +145,16 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
|
||||||
case WORKSHEET_DATAITEM::WS_TEXT:
|
case WORKSHEET_DATAITEM::WS_TEXT:
|
||||||
{
|
{
|
||||||
WORKSHEET_DATAITEM_TEXT * wsText = (WORKSHEET_DATAITEM_TEXT*)wsItem;
|
WORKSHEET_DATAITEM_TEXT * wsText = (WORKSHEET_DATAITEM_TEXT*)wsItem;
|
||||||
|
bool multilines = false;
|
||||||
|
|
||||||
if( wsText->m_SpecialMode )
|
if( wsText->m_SpecialMode )
|
||||||
wsText->m_FullText = wsText->m_TextBase;
|
wsText->m_FullText = wsText->m_TextBase;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
|
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
|
||||||
|
if( wsText->m_FullText.Replace( wxT("\\n" ), wxT("\n") ) > 0 )
|
||||||
|
multilines = true;
|
||||||
|
}
|
||||||
|
|
||||||
if( wsText->m_FullText.IsEmpty() )
|
if( wsText->m_FullText.IsEmpty() )
|
||||||
break;
|
break;
|
||||||
|
@ -180,10 +184,12 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
|
||||||
pensize, color,
|
pensize, color,
|
||||||
wsText->IsItalic(),
|
wsText->IsItalic(),
|
||||||
wsText->IsBold() ) );
|
wsText->IsBold() ) );
|
||||||
|
gtext->SetMultilineAllowed( multilines );
|
||||||
wsText->TransfertSetupToGraphicText( gtext );
|
wsText->TransfertSetupToGraphicText( gtext );
|
||||||
|
|
||||||
// Increment label for the next text
|
// Increment label for the next text
|
||||||
if( wsText->m_RepeatCount > 1 )
|
// (has no meaning for multiline texts)
|
||||||
|
if( wsText->m_RepeatCount > 1 && !multilines )
|
||||||
wsText->IncrementLabel( (jj+1)*wsText->m_IncrementLabel);
|
wsText->IncrementLabel( (jj+1)*wsText->m_IncrementLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,6 +368,7 @@ public:
|
||||||
DSIZE m_ConstrainedTextSize;// Actual text size, if constrained by
|
DSIZE m_ConstrainedTextSize;// Actual text size, if constrained by
|
||||||
// the m_BoundingBoxSize constraint
|
// the m_BoundingBoxSize constraint
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WORKSHEET_DATAITEM_TEXT( const wxChar* aTextBase );
|
WORKSHEET_DATAITEM_TEXT( const wxChar* aTextBase );
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,10 @@ public:
|
||||||
|
|
||||||
WORKSHEET_DATAITEM* GetParent() { return m_parent; }
|
WORKSHEET_DATAITEM* GetParent() { return m_parent; }
|
||||||
|
|
||||||
|
/** The function to draw a WS_DRAW_ITEM
|
||||||
|
*/
|
||||||
|
virtual void DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC ) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract function: should exist for derived items
|
* Abstract function: should exist for derived items
|
||||||
* return true if the point aPosition is on the item
|
* return true if the point aPosition is on the item
|
||||||
|
@ -109,6 +113,10 @@ public:
|
||||||
const wxPoint& GetStart() { return m_start; }
|
const wxPoint& GetStart() { return m_start; }
|
||||||
const wxPoint& GetEnd() { return m_end; }
|
const wxPoint& GetEnd() { return m_end; }
|
||||||
|
|
||||||
|
/** The function to draw a WS_DRAW_ITEM_LINE
|
||||||
|
*/
|
||||||
|
virtual void DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual function
|
* Virtual function
|
||||||
* return true if the point aPosition is on the line
|
* return true if the point aPosition is on the line
|
||||||
|
@ -155,6 +163,10 @@ public:
|
||||||
bool IsFilled() { return m_fill; }
|
bool IsFilled() { return m_fill; }
|
||||||
const wxPoint& GetPosition() { return m_pos; }
|
const wxPoint& GetPosition() { return m_pos; }
|
||||||
|
|
||||||
|
/** The function to draw a WS_DRAW_ITEM_POLYGON
|
||||||
|
*/
|
||||||
|
virtual void DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual function
|
* Virtual function
|
||||||
* return true if the point aPosition is inside one polygon
|
* return true if the point aPosition is inside one polygon
|
||||||
|
@ -179,6 +191,10 @@ public:
|
||||||
m_type = wsg_rect;
|
m_type = wsg_rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The function to draw a WS_DRAW_ITEM_RECT
|
||||||
|
*/
|
||||||
|
virtual void DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual function
|
* Virtual function
|
||||||
* return true if the point aPosition is on one edge of the rectangle
|
* return true if the point aPosition is on one edge of the rectangle
|
||||||
|
@ -207,15 +223,11 @@ public:
|
||||||
WS_DRAW_ITEM_TEXT( WORKSHEET_DATAITEM* aParent,
|
WS_DRAW_ITEM_TEXT( WORKSHEET_DATAITEM* aParent,
|
||||||
wxString& aText, wxPoint aPos, wxSize aSize,
|
wxString& aText, wxPoint aPos, wxSize aSize,
|
||||||
int aPenWidth, EDA_COLOR_T aColor,
|
int aPenWidth, EDA_COLOR_T aColor,
|
||||||
bool aItalic = false, bool aBold = false ) :
|
bool aItalic = false, bool aBold = false );
|
||||||
WS_DRAW_ITEM_BASE( aParent, wsg_text, aColor ), EDA_TEXT( aText )
|
|
||||||
{
|
/** The function to draw a WS_DRAW_ITEM_TEXT
|
||||||
SetTextPosition( aPos );
|
*/
|
||||||
SetSize( aSize );
|
virtual void DrawWsItem( EDA_RECT* aClipBox, wxDC* aDC );
|
||||||
SetThickness( aPenWidth );
|
|
||||||
SetItalic( aItalic );
|
|
||||||
SetBold( aBold );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors:
|
// Accessors:
|
||||||
int GetPenWidth() { return GetThickness(); }
|
int GetPenWidth() { return GetThickness(); }
|
||||||
|
|
Loading…
Reference in New Issue