KiCad PCB EDA Suite
WORKSHEET_DATAITEM Class Reference

#include <worksheet_dataitem.h>

Inheritance diagram for WORKSHEET_DATAITEM:
WORKSHEET_DATAITEM_BITMAP WORKSHEET_DATAITEM_POLYPOLYGON WORKSHEET_DATAITEM_TEXT

Public Types

enum  WS_ItemType {
  WS_TEXT, WS_SEGMENT, WS_RECT, WS_POLYPOLYGON,
  WS_BITMAP
}
 

Public Member Functions

 WORKSHEET_DATAITEM (WS_ItemType aType)
 
virtual ~WORKSHEET_DATAITEM ()
 
void SetStart (double aPosx, double aPosy, enum corner_anchor aAnchor=RB_CORNER)
 
void SetEnd (double aPosx, double aPosy, enum corner_anchor aAnchor=RB_CORNER)
 
WS_ItemType GetType () const
 
int GetFlags () const
 
void SetFlags (int aMask)
 
void ClearFlags (int aMask)
 
virtual bool HasEndPoint ()
 
int GetPage1Option ()
 
void SetPage1Option (int aChoice)
 Set the option for page 1. More...
 
const wxPoint GetStartPosUi (int ii=0) const
 
const wxPoint GetEndPosUi (int ii=0) const
 
const DPOINT GetStartPos (int ii=0) const
 
const DPOINT GetEndPos (int ii=0) const
 
virtual int GetPenSizeUi ()
 
void MoveTo (DPOINT aPosition)
 move item to a new position More...
 
void MoveToUi (wxPoint aPosition)
 move item to a new position More...
 
void MoveStartPointTo (DPOINT aPosition)
 move the starting point of the item to a new position More...
 
void MoveStartPointToUi (wxPoint aPosition)
 move the starting point of the item to a new position More...
 
void MoveEndPointTo (DPOINT aPosition)
 move the ending point of the item to a new position has meaning only for items defined by 2 points (segments and rectangles) More...
 
void MoveEndPointToUi (wxPoint aPosition)
 move the ending point of the item to a new position has meaning only for items defined by 2 points (segments and rectangles) More...
 
virtual bool IsInsidePage (int ii) const
 
const wxString GetClassName () const
 
bool IsSelected ()
 
void SetSelected (bool aState)
 Function SetSelected Toggles on/off the selected flag (used in editing functions) More...
 
bool UseAltColor ()
 
COLOR4D GetItemColor ()
 

Static Public Member Functions

static int GetMarkerSizeUi (double aZoomScale=1.0)
 

Public Attributes

wxString m_Name
 
wxString m_Info
 
POINT_COORD m_Pos
 
POINT_COORD m_End
 
double m_LineWidth
 
int m_RepeatCount
 
DPOINT m_IncrementVector
 
int m_IncrementLabel
 

Static Public Attributes

static double m_WSunits2Iu = 1.0
 
static DPOINT m_RB_Corner
 
static DPOINT m_LT_Corner
 
static double m_DefaultLineWidth = 0.0
 
static DSIZE m_DefaultTextSize
 
static double m_DefaultTextThickness = 0.0
 
static bool m_SpecialMode = false
 
static COLOR4D m_Color = COLOR4D( RED )
 
static COLOR4D m_AltColor = COLOR4D( RED )
 
static COLOR4D m_SelectedColor = COLOR4D( BROWN )
 

Protected Attributes

WS_ItemType m_type
 
int m_flags
 

Detailed Description

Definition at line 96 of file worksheet_dataitem.h.

Member Enumeration Documentation

◆ WS_ItemType

Constructor & Destructor Documentation

◆ WORKSHEET_DATAITEM()

WORKSHEET_DATAITEM::WORKSHEET_DATAITEM ( WS_ItemType  aType)

Definition at line 82 of file worksheet_dataitem.cpp.

83 {
84  m_type = aType;
85  m_flags = 0;
86  m_RepeatCount = 1;
87  m_IncrementLabel = 1;
88  m_LineWidth = 0;
89 }

References m_flags, m_IncrementLabel, m_LineWidth, m_RepeatCount, and m_type.

◆ ~WORKSHEET_DATAITEM()

virtual WORKSHEET_DATAITEM::~WORKSHEET_DATAITEM ( )
inlinevirtual

Definition at line 152 of file worksheet_dataitem.h.

152 {}

Member Function Documentation

◆ ClearFlags()

void WORKSHEET_DATAITEM::ClearFlags ( int  aMask)
inline

◆ GetClassName()

const wxString WORKSHEET_DATAITEM::GetClassName ( ) const

Definition at line 326 of file worksheet_dataitem.cpp.

327 {
328  wxString name;
329 
330  switch( GetType() )
331  {
332  case WS_TEXT: name = wxT( "Text" ); break;
333  case WS_SEGMENT: name = wxT( "Line" ); break;
334  case WS_RECT: name = wxT( "Rect" ); break;
335  case WS_POLYPOLYGON: name = wxT( "Poly" ); break;
336  case WS_BITMAP: name = wxT( "Bitmap" ); break;
337  }
338 
339  return name;
340 }
WS_ItemType GetType() const
const char * name
Definition: DXF_plotter.cpp:61

References GetType(), name, WS_BITMAP, WS_POLYPOLYGON, WS_RECT, WS_SEGMENT, and WS_TEXT.

Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), and PL_EDITOR_FRAME::RebuildDesignTree().

◆ GetEndPos()

const DPOINT WORKSHEET_DATAITEM::GetEndPos ( int  ii = 0) const

Definition at line 268 of file worksheet_dataitem.cpp.

269 {
270  DPOINT pos;
271  pos.x = m_End.m_Pos.x + ( m_IncrementVector.x * ii );
272  pos.y = m_End.m_Pos.y + ( m_IncrementVector.y * ii );
273 
274  switch( m_End.m_Anchor )
275  {
276  case RB_CORNER: // right bottom corner
277  pos = m_RB_Corner - pos;
278  break;
279 
280  case RT_CORNER: // right top corner
281  pos.x = m_RB_Corner.x - pos.x;
282  pos.y = m_LT_Corner.y + pos.y;
283  break;
284 
285  case LB_CORNER: // left bottom corner
286  pos.x = m_LT_Corner.x + pos.x;
287  pos.y = m_RB_Corner.y - pos.y;
288  break;
289 
290  case LT_CORNER: // left top corner
291  pos = m_LT_Corner + pos;
292  break;
293  }
294 
295  return pos;
296 }
static DPOINT m_LT_Corner
static DPOINT m_RB_Corner

References LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_End, m_IncrementVector, m_LT_Corner, POINT_COORD::m_Pos, m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by GetEndPosUi(), IsInsidePage(), PL_EDITOR_FRAME::MoveItem(), MoveTo(), and PL_EDITOR_FRAME::PlaceItem().

◆ GetEndPosUi()

const wxPoint WORKSHEET_DATAITEM::GetEndPosUi ( int  ii = 0) const

Definition at line 299 of file worksheet_dataitem.cpp.

300 {
301  DPOINT pos = GetEndPos( ii );
302  pos = pos * m_WSunits2Iu;
303  return wxPoint( KiROUND( pos.x ), KiROUND( pos.y ) );
304 }
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:118
static double m_WSunits2Iu
const DPOINT GetEndPos(int ii=0) const

References GetEndPos(), KiROUND(), m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), moveItem(), and PL_EDITOR_FRAME::MoveItem().

◆ GetFlags()

int WORKSHEET_DATAITEM::GetFlags ( ) const
inline

◆ GetItemColor()

COLOR4D WORKSHEET_DATAITEM::GetItemColor ( )
inline

Definition at line 288 of file worksheet_dataitem.h.

289  {
290  if( IsSelected() )
291  return m_SelectedColor;
292 
293  if( UseAltColor() )
294  return m_AltColor;
295 
296  return m_Color;
297  }
static COLOR4D m_SelectedColor
static COLOR4D m_Color
static COLOR4D m_AltColor

References IsSelected(), m_AltColor, m_Color, m_SelectedColor, and UseAltColor().

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList().

◆ GetMarkerSizeUi()

static int WORKSHEET_DATAITEM::GetMarkerSizeUi ( double  aZoomScale = 1.0)
inlinestatic
Returns
the size of markers used in page layout editor to draw the anchor points of selected items.
Parameters
aZoomScaleis a scaling factor that can be used to adjust the final marker size depending on zoom level

Definition at line 213 of file worksheet_dataitem.h.

214  {
215  #define MARKER_DRAW_SIZE 0.5 // Is a value choosen for a suitable size on screen
216  return KiROUND( MARKER_DRAW_SIZE * m_WSunits2Iu * aZoomScale );
217  }
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:118
static double m_WSunits2Iu
#define MARKER_DRAW_SIZE

References KiROUND(), m_WSunits2Iu, and MARKER_DRAW_SIZE.

Referenced by WS_DRAW_ITEM_LIST::Draw(), WS_DRAW_ITEM_LINE::HitTestEndPoint(), WS_DRAW_ITEM_RECT::HitTestEndPoint(), WS_DRAW_ITEM_LINE::HitTestStartPoint(), WS_DRAW_ITEM_POLYGON::HitTestStartPoint(), WS_DRAW_ITEM_RECT::HitTestStartPoint(), WS_DRAW_ITEM_TEXT::HitTestStartPoint(), and WS_DRAW_ITEM_BITMAP::HitTestStartPoint().

◆ GetPage1Option()

int WORKSHEET_DATAITEM::GetPage1Option ( )
Returns
0 if the item has no specific option for page 1 1 if the item is only on page 1 -1 if the item is not on page 1

Definition at line 347 of file worksheet_dataitem.cpp.

348 {
350  return -1;
351 
353  return 1;
354 
355  return 0;
356 }
#define PAGE1OPTION_PAGE1ONLY
#define PAGE1OPTION
#define PAGE1OPTION_NOTONPAGE1

References m_flags, PAGE1OPTION, PAGE1OPTION_NOTONPAGE1, and PAGE1OPTION_PAGE1ONLY.

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), and WORKSHEET_LAYOUT_IO::formatOptions().

◆ GetPenSizeUi()

virtual int WORKSHEET_DATAITEM::GetPenSizeUi ( )
inlinevirtual

Reimplemented in WORKSHEET_DATAITEM_TEXT, and WORKSHEET_DATAITEM_POLYPOLYGON.

Definition at line 200 of file worksheet_dataitem.h.

201  {
202  if( m_LineWidth )
203  return KiROUND( m_LineWidth * m_WSunits2Iu );
204  else
206  }
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:118
static double m_WSunits2Iu
static double m_DefaultLineWidth

References KiROUND(), m_DefaultLineWidth, m_LineWidth, and m_WSunits2Iu.

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList().

◆ GetStartPos()

const DPOINT WORKSHEET_DATAITEM::GetStartPos ( int  ii = 0) const

Definition at line 229 of file worksheet_dataitem.cpp.

230 {
231  DPOINT pos;
232  pos.x = m_Pos.m_Pos.x + ( m_IncrementVector.x * ii );
233  pos.y = m_Pos.m_Pos.y + ( m_IncrementVector.y * ii );
234 
235  switch( m_Pos.m_Anchor )
236  {
237  case RB_CORNER: // right bottom corner
238  pos = m_RB_Corner - pos;
239  break;
240 
241  case RT_CORNER: // right top corner
242  pos.x = m_RB_Corner.x - pos.x;
243  pos.y = m_LT_Corner.y + pos.y;
244  break;
245 
246  case LB_CORNER: // left bottom corner
247  pos.x = m_LT_Corner.x + pos.x;
248  pos.y = m_RB_Corner.y - pos.y;
249  break;
250 
251  case LT_CORNER: // left top corner
252  pos = m_LT_Corner + pos;
253  break;
254  }
255 
256  return pos;
257 }
static DPOINT m_LT_Corner
static DPOINT m_RB_Corner

References LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_IncrementVector, m_LT_Corner, POINT_COORD::m_Pos, m_Pos, m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPosition(), GetStartPosUi(), IsInsidePage(), WORKSHEET_DATAITEM_POLYPOLYGON::IsInsidePage(), PL_EDITOR_FRAME::MoveItem(), MoveTo(), and PL_EDITOR_FRAME::PlaceItem().

◆ GetStartPosUi()

const wxPoint WORKSHEET_DATAITEM::GetStartPosUi ( int  ii = 0) const

Definition at line 260 of file worksheet_dataitem.cpp.

261 {
262  DPOINT pos = GetStartPos( ii );
263  pos = pos * m_WSunits2Iu;
264  return wxPoint( KiROUND( pos.x ), KiROUND( pos.y ) );
265 }
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:118
static double m_WSunits2Iu
const DPOINT GetStartPos(int ii=0) const

References GetStartPos(), KiROUND(), m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), EVT_MENU_RANGE(), moveItem(), and PL_EDITOR_FRAME::MoveItem().

◆ GetType()

◆ HasEndPoint()

virtual bool WORKSHEET_DATAITEM::HasEndPoint ( )
inlinevirtual
Returns
true if the item has a end point (segment; rect) of false (text, polugon)

Reimplemented in WORKSHEET_DATAITEM_BITMAP, WORKSHEET_DATAITEM_TEXT, and WORKSHEET_DATAITEM_POLYPOLYGON.

Definition at line 178 of file worksheet_dataitem.h.

178 { return true; }

Referenced by PL_EDITOR_FRAME::OnHotKey().

◆ IsInsidePage()

bool WORKSHEET_DATAITEM::IsInsidePage ( int  ii) const
virtual
Returns
true if the item is inside the rectangle defined by the 4 corners, false otherwise.

Reimplemented in WORKSHEET_DATAITEM_POLYPOLYGON.

Definition at line 307 of file worksheet_dataitem.cpp.

308 {
309  DPOINT pos = GetStartPos( ii );
310 
311  for( int kk = 0; kk < 1; kk++ )
312  {
313  if( m_RB_Corner.x < pos.x || m_LT_Corner.x > pos.x )
314  return false;
315 
316  if( m_RB_Corner.y < pos.y || m_LT_Corner.y > pos.y )
317  return false;
318 
319  pos = GetEndPos( ii );
320  }
321 
322  return true;
323 }
const DPOINT GetEndPos(int ii=0) const
const DPOINT GetStartPos(int ii=0) const
static DPOINT m_LT_Corner
static DPOINT m_RB_Corner

References GetEndPos(), GetStartPos(), m_LT_Corner, m_RB_Corner, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList().

◆ IsSelected()

bool WORKSHEET_DATAITEM::IsSelected ( )
inline
Returns
true if the selected state on ON

Definition at line 271 of file worksheet_dataitem.h.

271 { return (m_flags & SELECTED_STATE) != 0; }
#define SELECTED_STATE

References m_flags, and SELECTED_STATE.

Referenced by GetItemColor().

◆ MoveEndPointTo()

void WORKSHEET_DATAITEM::MoveEndPointTo ( DPOINT  aPosition)

move the ending point of the item to a new position has meaning only for items defined by 2 points (segments and rectangles)

move the ending point of the item to a new position has meaning only for items defined by 2 points (segments and rectangles) aPosition = the new position of the ending point, in mm

Parameters
aPosition= the new position of the ending point, in mm

Definition at line 172 of file worksheet_dataitem.cpp.

173 {
174  DPOINT position;
175 
176  // Calculate the position of the starting point
177  // relative to the reference corner
178  // aPosition is the position relative to the right top paper corner
179  switch( m_End.m_Anchor )
180  {
181  case RB_CORNER:
182  position = m_RB_Corner - aPosition;
183  break;
184 
185  case RT_CORNER:
186  position.x = m_RB_Corner.x - aPosition.x;
187  position.y = aPosition.y - m_LT_Corner.y;
188  break;
189 
190  case LB_CORNER:
191  position.x = aPosition.x - m_LT_Corner.x;
192  position.y = m_RB_Corner.y - aPosition.y;
193  break;
194 
195  case LT_CORNER:
196  position = aPosition - m_LT_Corner;
197  break;
198  }
199 
200  // Modify m_End only for items having 2 coordinates
201  switch( GetType() )
202  {
203  case WS_SEGMENT:
204  case WS_RECT:
205  m_End.m_Pos = position;
206  break;
207 
208  default:
209  break;
210  }
211 }
WS_ItemType GetType() const
static DPOINT m_LT_Corner
static DPOINT m_RB_Corner

References GetType(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_End, m_LT_Corner, POINT_COORD::m_Pos, m_RB_Corner, RB_CORNER, RT_CORNER, WS_RECT, WS_SEGMENT, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by abortMoveItem(), MoveEndPointToUi(), MoveTo(), and PL_EDITOR_FRAME::PlaceItem().

◆ MoveEndPointToUi()

void WORKSHEET_DATAITEM::MoveEndPointToUi ( wxPoint  aPosition)

move the ending point of the item to a new position has meaning only for items defined by 2 points (segments and rectangles)

Parameters
aPosition= the new position of the ending point in graphic units

Definition at line 219 of file worksheet_dataitem.cpp.

220 {
221  DPOINT pos_mm;
222  pos_mm.x = aPosition.x / m_WSunits2Iu;
223  pos_mm.y = aPosition.y / m_WSunits2Iu;
224 
225  MoveEndPointTo( pos_mm );
226 }
static double m_WSunits2Iu
void MoveEndPointTo(DPOINT aPosition)
move the ending point of the item to a new position has meaning only for items defined by 2 points (s...

References m_WSunits2Iu, MoveEndPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by moveItem().

◆ MoveStartPointTo()

void WORKSHEET_DATAITEM::MoveStartPointTo ( DPOINT  aPosition)

move the starting point of the item to a new position

Parameters
aPosition= the new position of the starting point, in mm

Definition at line 121 of file worksheet_dataitem.cpp.

122 {
123  DPOINT position;
124 
125  // Calculate the position of the starting point
126  // relative to the reference corner
127  // aPosition is the position relative to the right top paper corner
128  switch( m_Pos.m_Anchor )
129  {
130  case RB_CORNER:
131  position = m_RB_Corner - aPosition;
132  break;
133 
134  case RT_CORNER:
135  position.x = m_RB_Corner.x - aPosition.x;
136  position.y = aPosition.y - m_LT_Corner.y;
137  break;
138 
139  case LB_CORNER:
140  position.x = aPosition.x - m_LT_Corner.x;
141  position.y = m_RB_Corner.y - aPosition.y;
142  break;
143 
144  case LT_CORNER:
145  position = aPosition - m_LT_Corner;
146  break;
147  }
148 
149  m_Pos.m_Pos = position;
150 }
static DPOINT m_LT_Corner
static DPOINT m_RB_Corner

References LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_LT_Corner, POINT_COORD::m_Pos, m_Pos, m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by abortMoveItem(), MoveStartPointToUi(), MoveTo(), and PL_EDITOR_FRAME::PlaceItem().

◆ MoveStartPointToUi()

void WORKSHEET_DATAITEM::MoveStartPointToUi ( wxPoint  aPosition)

move the starting point of the item to a new position

Parameters
aPosition= the new position of item in graphic units

Definition at line 156 of file worksheet_dataitem.cpp.

157 {
158  DPOINT pos_mm;
159  pos_mm.x = aPosition.x / m_WSunits2Iu;
160  pos_mm.y = aPosition.y / m_WSunits2Iu;
161 
162  MoveStartPointTo( pos_mm );
163 }
static double m_WSunits2Iu
void MoveStartPointTo(DPOINT aPosition)
move the starting point of the item to a new position

References m_WSunits2Iu, MoveStartPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by moveItem().

◆ MoveTo()

void WORKSHEET_DATAITEM::MoveTo ( DPOINT  aPosition)

move item to a new position

Parameters
aPosition= the new position of item, in mm

Definition at line 108 of file worksheet_dataitem.cpp.

109 {
110  DPOINT vector = aPosition - GetStartPos();
111  DPOINT endpos = vector + GetEndPos();
112 
113  MoveStartPointTo( aPosition );
114  MoveEndPointTo( endpos );
115 }
const DPOINT GetEndPos(int ii=0) const
const DPOINT GetStartPos(int ii=0) const
void MoveEndPointTo(DPOINT aPosition)
move the ending point of the item to a new position has meaning only for items defined by 2 points (s...
void MoveStartPointTo(DPOINT aPosition)
move the starting point of the item to a new position

References GetEndPos(), GetStartPos(), MoveEndPointTo(), and MoveStartPointTo().

Referenced by abortMoveItem(), MoveToUi(), and PL_EDITOR_FRAME::PlaceItem().

◆ MoveToUi()

void WORKSHEET_DATAITEM::MoveToUi ( wxPoint  aPosition)

move item to a new position

Parameters
aPosition= the new position of the starting point in graphic units

Definition at line 98 of file worksheet_dataitem.cpp.

99 {
100  DPOINT pos_mm;
101  pos_mm.x = aPosition.x / m_WSunits2Iu;
102  pos_mm.y = aPosition.y / m_WSunits2Iu;
103 
104  MoveTo( pos_mm );
105 }
static double m_WSunits2Iu
void MoveTo(DPOINT aPosition)
move item to a new position

References m_WSunits2Iu, MoveTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by moveItem().

◆ SetEnd()

void WORKSHEET_DATAITEM::SetEnd ( double  aPosx,
double  aPosy,
enum corner_anchor  aAnchor = RB_CORNER 
)
inline

Definition at line 161 of file worksheet_dataitem.h.

162  {
163  m_End.m_Pos.x = aPosx;
164  m_End.m_Pos.y = aPosy;
165  m_End.m_Anchor = aAnchor;
166  }

References POINT_COORD::m_Anchor, m_End, POINT_COORD::m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ SetFlags()

void WORKSHEET_DATAITEM::SetFlags ( int  aMask)
inline

Definition at line 171 of file worksheet_dataitem.h.

171 { m_flags |= aMask; }

References m_flags.

Referenced by EVT_MENU_RANGE(), PL_EDITOR_FRAME::Locate(), and SetPage1Option().

◆ SetPage1Option()

void WORKSHEET_DATAITEM::SetPage1Option ( int  aChoice)

Set the option for page 1.

Parameters
aChoice= 0 if the item has no specific option for page 1

0 if the item is only on page 1

< 0 if the item is not on page 1

Definition at line 364 of file worksheet_dataitem.cpp.

365 {
367 
368  if( aChoice > 0 )
370 
371  else if( aChoice < 0 )
373 
374 }
#define PAGE1OPTION_PAGE1ONLY
void ClearFlags(int aMask)
void SetFlags(int aMask)
#define PAGE1OPTION
#define PAGE1OPTION_NOTONPAGE1

References ClearFlags(), PAGE1OPTION, PAGE1OPTION_NOTONPAGE1, PAGE1OPTION_PAGE1ONLY, and SetFlags().

Referenced by PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), and PAGE_LAYOUT_READER_PARSER::readOption().

◆ SetSelected()

void WORKSHEET_DATAITEM::SetSelected ( bool  aState)
inline

Function SetSelected Toggles on/off the selected flag (used in editing functions)

Parameters
aState= the flag value

Definition at line 278 of file worksheet_dataitem.h.

279  {
280  if( aState )
282  else
284  }
#define SELECTED_STATE

References m_flags, and SELECTED_STATE.

Referenced by PL_EDITOR_FRAME::RedrawActiveWindow().

◆ SetStart()

void WORKSHEET_DATAITEM::SetStart ( double  aPosx,
double  aPosy,
enum corner_anchor  aAnchor = RB_CORNER 
)
inline

Definition at line 154 of file worksheet_dataitem.h.

155  {
156  m_Pos.m_Pos.x = aPosx;
157  m_Pos.m_Pos.y = aPosy;
158  m_Pos.m_Anchor = aAnchor;
159  }

References POINT_COORD::m_Anchor, POINT_COORD::m_Pos, m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ UseAltColor()

bool WORKSHEET_DATAITEM::UseAltColor ( )
inline

Definition at line 286 of file worksheet_dataitem.h.

286 {return m_flags & USE_ALT_COLOR; }
#define USE_ALT_COLOR

References m_flags, and USE_ALT_COLOR.

Referenced by GetItemColor().

Member Data Documentation

◆ m_AltColor

COLOR4D WORKSHEET_DATAITEM::m_AltColor = COLOR4D( RED )
static

◆ m_Color

COLOR4D WORKSHEET_DATAITEM::m_Color = COLOR4D( RED )
static

◆ m_DefaultLineWidth

◆ m_DefaultTextSize

◆ m_DefaultTextThickness

◆ m_End

◆ m_flags

◆ m_IncrementLabel

◆ m_IncrementVector

◆ m_Info

◆ m_LineWidth

◆ m_LT_Corner

◆ m_Name

◆ m_Pos

◆ m_RB_Corner

◆ m_RepeatCount

◆ m_SelectedColor

COLOR4D WORKSHEET_DATAITEM::m_SelectedColor = COLOR4D( BROWN )
static

Definition at line 145 of file worksheet_dataitem.h.

Referenced by GetItemColor(), and PL_EDITOR_FRAME::RedrawActiveWindow().

◆ m_SpecialMode

◆ m_type

WS_ItemType WORKSHEET_DATAITEM::m_type
protected

Definition at line 108 of file worksheet_dataitem.h.

Referenced by GetType(), and WORKSHEET_DATAITEM().

◆ m_WSunits2Iu


The documentation for this class was generated from the following files: