KiCad PCB EDA Suite
lib_text.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
28 #include <fctsys.h>
29 #include <gr_basic.h>
30 #include <macros.h>
31 #include <sch_draw_panel.h>
32 #include <plotter.h>
33 #include <draw_graphic_text.h>
34 #include <trigo.h>
35 #include <base_units.h>
36 #include <msgpanel.h>
37 #include <bitmaps.h>
38 
39 #include <lib_draw_item.h>
40 #include <general.h>
41 #include <transform.h>
42 #include <lib_text.h>
43 
44 
46  LIB_ITEM( LIB_TEXT_T, aParent ),
47  EDA_TEXT()
48 {
49  SetTextSize( wxSize( 50, 50 ) );
50  m_rotate = false;
51  m_updateText = false;
52 }
53 
54 
55 void LIB_TEXT::ViewGetLayers( int aLayers[], int& aCount ) const
56 {
57  aCount = 1;
58  aLayers[0] = LAYER_DEVICE;
59 }
60 
61 
62 bool LIB_TEXT::HitTest( const wxPoint& aPosition ) const
63 {
64  return HitTest( aPosition, 0, DefaultTransform );
65 }
66 
67 
68 bool LIB_TEXT::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const
69 {
70  if( aThreshold < 0 )
71  aThreshold = 0;
72 
73  EDA_TEXT tmp_text( *this );
74  tmp_text.SetTextPos( aTransform.TransformCoordinate( GetTextPos() ) );
75 
76  /* The text orientation may need to be flipped if the
77  * transformation matrix causes xy axes to be flipped.
78  * this simple algo works only for schematic matrix (rot 90 or/and mirror)
79  */
80  bool t1 = ( aTransform.x1 != 0 ) ^ ( GetTextAngle() != 0 );
81 
83  return tmp_text.TextHitTest( aPosition );
84 }
85 
86 
88 {
89  LIB_TEXT* newitem = new LIB_TEXT(NULL);
90 
91  newitem->m_Unit = m_Unit;
92  newitem->m_Convert = m_Convert;
93  newitem->m_Flags = m_Flags;
94  newitem->m_Text = m_Text;
95 
96  newitem->SetEffects( *this );
97 
98  return newitem;
99 }
100 
101 
102 int LIB_TEXT::compare( const LIB_ITEM& other ) const
103 {
104  wxASSERT( other.Type() == LIB_TEXT_T );
105 
106  const LIB_TEXT* tmp = ( LIB_TEXT* ) &other;
107 
108  int result = m_Text.CmpNoCase( tmp->m_Text );
109 
110  if( result != 0 )
111  return result;
112 
113  if( GetTextPos().x != tmp->GetTextPos().x )
114  return GetTextPos().x - tmp->GetTextPos().x;
115 
116  if( GetTextPos().y != tmp->GetTextPos().y )
117  return GetTextPos().y - tmp->GetTextPos().y;
118 
119  if( GetTextWidth() != tmp->GetTextWidth() )
120  return GetTextWidth() - tmp->GetTextWidth();
121 
122  if( GetTextHeight() != tmp->GetTextHeight() )
123  return GetTextHeight() - tmp->GetTextHeight();
124 
125  return 0;
126 }
127 
128 
129 void LIB_TEXT::SetOffset( const wxPoint& aOffset )
130 {
131  EDA_TEXT::Offset( aOffset );
132 }
133 
134 
135 bool LIB_TEXT::Inside( EDA_RECT& rect ) const
136 {
137  return rect.Intersects( GetBoundingBox() );
138 }
139 
140 
141 void LIB_TEXT::Move( const wxPoint& newPosition )
142 {
143  SetTextPos( newPosition );
144 }
145 
146 
147 void LIB_TEXT::MirrorHorizontal( const wxPoint& center )
148 {
149  int x = GetTextPos().x;
150 
151  x -= center.x;
152  x *= -1;
153  x += center.x;
154 
155  SetTextX( x );
156 }
157 
158 
159 void LIB_TEXT::MirrorVertical( const wxPoint& center )
160 {
161  int y = GetTextPos().y;
162 
163  y -= center.y;
164  y *= -1;
165  y += center.y;
166 
167  SetTextY( y );
168 }
169 
170 
171 void LIB_TEXT::Rotate( const wxPoint& center, bool aRotateCCW )
172 {
173  int rot_angle = aRotateCCW ? -900 : 900;
174 
175  wxPoint pt = GetTextPos();
176  RotatePoint( &pt, center, rot_angle );
177  SetTextPos( pt );
178 
179  SetTextAngle( GetTextAngle() != 0.0 ? 0 : 900 );
180 }
181 
182 
183 void LIB_TEXT::Plot( PLOTTER* plotter, const wxPoint& offset, bool fill,
184  const TRANSFORM& aTransform )
185 {
186  wxASSERT( plotter != NULL );
187 
188  EDA_RECT bBox = GetBoundingBox();
189  // convert coordinates from draw Y axis to libedit Y axis
190  bBox.RevertYAxis();
191  wxPoint txtpos = bBox.Centre();
192 
193  /* The text orientation may need to be flipped if the
194  * transformation matrix causes xy axes to be flipped. */
195  int t1 = ( aTransform.x1 != 0 ) ^ ( GetTextAngle() != 0 );
196  wxPoint pos = aTransform.TransformCoordinate( txtpos ) + offset;
197 
198  // Get color
199  COLOR4D color;
200 
201  if( plotter->GetColorMode() ) // Used normal color or selected color
203  else
204  color = COLOR4D::BLACK;
205 
206  plotter->Text( pos, color, GetShownText(),
209  GetPenSize(), IsItalic(), IsBold() );
210 }
211 
212 
214 {
215  int pensize = GetThickness();
216 
217  if( pensize == 0 ) // Use default values for pen size
218  {
219  if( IsBold() )
220  pensize = GetPenSizeForBold( GetTextWidth() );
221  else
222  pensize = GetDefaultLineThickness();
223  }
224 
225  // Clip pen size for small texts:
226  pensize = Clamp_Text_PenSize( pensize, GetTextSize(), IsBold() );
227  return pensize;
228 }
229 
230 
231 void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
232  COLOR4D aColor, GR_DRAWMODE aDrawMode, void* aData,
233  const TRANSFORM& aTransform )
234 {
236 
237  if( aColor == COLOR4D::UNSPECIFIED ) // Used normal color or selected color
238  {
239  if( IsSelected() )
240  color = GetItemSelectedColor();
241  }
242  else
243  {
244  color = aColor;
245  }
246 
247  GRSetDrawMode( aDC, aDrawMode );
248 
249  /* Calculate the text orientation, according to the component
250  * orientation/mirror (needed when draw text in schematic)
251  */
252  int orient = GetTextAngle();
253 
254  if( aTransform.y1 ) // Rotate component 90 degrees.
255  {
256  if( orient == TEXT_ANGLE_HORIZ )
257  orient = TEXT_ANGLE_VERT;
258  else
259  orient = TEXT_ANGLE_HORIZ;
260  }
261 
262  /* Calculate the text justification, according to the component
263  * orientation/mirror this is a bit complicated due to cumulative
264  * calculations:
265  * - numerous cases (mirrored or not, rotation)
266  * - the DrawGraphicText function recalculate also H and H justifications
267  * according to the text orientation.
268  * - When a component is mirrored, the text is not mirrored and
269  * justifications are complicated to calculate
270  * so the more easily way is to use no justifications ( Centered text )
271  * and use GetBoundaryBox to know the text coordinate considered as centered
272  */
273  EDA_RECT bBox = GetBoundingBox();
274 
275  // convert coordinates from draw Y axis to libedit Y axis:
276  bBox.RevertYAxis();
277  wxPoint txtpos = bBox.Centre();
278 
279  // Calculate pos according to mirror/rotation.
280  txtpos = aTransform.TransformCoordinate( txtpos ) + aOffset;
281 
282  EDA_RECT* clipbox = aPanel? aPanel->GetClipBox() : NULL;
283  DrawGraphicText( clipbox, aDC, txtpos, color, GetShownText(), orient, GetTextSize(),
285  IsItalic(), IsBold() );
286 
287 
288  /* Enable this to draw the bounding box around the text field to validate
289  * the bounding box calculations.
290  */
291 #if 0
292  // bBox already uses libedit Y axis.
293  bBox = aTransform.TransformCoordinate( bBox );
294  bBox.Move( aOffset );
295  GRRect( clipbox, aDC, bBox, 0, LIGHTMAGENTA );
296 #endif
297 }
298 
299 
301 {
302  wxString msg;
303 
304  LIB_ITEM::GetMsgPanelInfo( aUnits, aList );
305 
306  msg = MessageTextFromValue( aUnits, GetThickness(), true );
307 
308  aList.push_back( MSG_PANEL_ITEM( _( "Line Width" ), msg, BLUE ) );
309 }
310 
311 
313 {
314  /* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
315  * calling GetTextBox() that works using top to bottom Y axis orientation.
316  */
317  EDA_RECT rect = GetTextBox( -1, -1, true );
318  rect.RevertYAxis();
319 
320  // We are using now a bottom to top Y axis.
321  wxPoint orig = rect.GetOrigin();
322  wxPoint end = rect.GetEnd();
323 
324  RotatePoint( &orig, GetTextPos(), -GetTextAngle() );
325  RotatePoint( &end, GetTextPos(), -GetTextAngle() );
326 
327  rect.SetOrigin( orig );
328  rect.SetEnd( end );
329 
330  // We are using now a top to bottom Y axis:
331  rect.RevertYAxis();
332 
333  return rect;
334 }
335 
336 
338 {
339  if( InEditMode() )
340  {
341  m_rotate = true;
342  }
343  else
344  {
346  }
347 }
348 
349 
350 void LIB_TEXT::SetText( const wxString& aText )
351 {
352  if( aText == m_Text )
353  return;
354 
355  if( InEditMode() )
356  {
357  m_savedText = aText;
358  m_updateText = true;
359  }
360  else
361  {
362  m_Text = aText;
363  }
364 }
365 
366 
367 wxString LIB_TEXT::GetSelectMenuText( EDA_UNITS_T aUnits ) const
368 {
369  return wxString::Format( _( "Graphic Text \"%s\"" ), ShortenedShownText() );
370 }
371 
372 
374 {
375  return text_xpm;
376 }
377 
378 
379 void LIB_TEXT::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
380 {
381  wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED ) ) != 0,
382  wxT( "Invalid edit mode for LIB_TEXT object." ) );
383 
384  if( aEditMode == IS_MOVED )
385  {
387  m_initialCursorPos = aPosition;
388  }
389  else
390  {
391  SetTextPos( aPosition );
392  }
393 
394  m_Flags = aEditMode;
395 }
396 
397 
398 bool LIB_TEXT::ContinueEdit( const wxPoint aPosition )
399 {
400  wxCHECK_MSG( ( m_Flags & ( IS_NEW | IS_MOVED ) ) != 0, false,
401  wxT( "Bad call to ContinueEdit(). Text is not being edited." ) );
402 
403  return false;
404 }
405 
406 
407 void LIB_TEXT::EndEdit( const wxPoint& aPosition, bool aAbort )
408 {
409  wxCHECK_RET( ( m_Flags & ( IS_NEW | IS_MOVED ) ) != 0,
410  wxT( "Bad call to EndEdit(). Text is not being edited." ) );
411 
412  m_Flags = 0;
413  m_rotate = false;
414  m_updateText = false;
415 }
416 
417 
418 void LIB_TEXT::CalcEdit( const wxPoint& aPosition )
419 {
420  DBG(printf("textCalcEdit %d %d\n", aPosition.x, aPosition.y );)
421 
422  if( m_rotate )
423  {
425  m_rotate = false;
426  }
427 
428  if( m_updateText )
429  {
430  std::swap( m_Text, m_savedText );
431  m_updateText = false;
432  }
433 
434  if( m_Flags == IS_NEW )
435  {
436  SetTextPos( aPosition );
437  }
438  else if( m_Flags == IS_MOVED )
439  {
440  Move( m_initialPos + aPosition - m_initialCursorPos );
441  DBG(printf("%p: move %d %d\n", this, GetPosition().x, GetPosition().y );)
442  }
443 
444  DBG(printf("%p: move2 %d %d\n", this, GetPosition().x, GetPosition().y );)
445 }
void SetTextAngle(double aAngle)
Definition: eda_text.h:169
Definition: colors.h:57
#define TEXT_ANGLE_HORIZ
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
virtual void GetMsgPanelInfo(EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
void Offset(const wxPoint &aOffset)
Definition: eda_text.h:242
void BeginEdit(STATUS_FLAGS aEditMode, const wxPoint aStartPoint=wxPoint(0, 0)) override
Begin an editing a component library draw item in aEditMode at aPosition.
Definition: lib_text.cpp:379
void Plot(PLOTTER *aPlotter, const wxPoint &aOffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
Definition: lib_text.cpp:183
int Clamp_Text_PenSize(int aPenSize, int aSize, bool aBold)
Function Clamp_Text_PenSize As a rule, pen width should not be >1/4em, otherwise the character will b...
void Move(const wxPoint &aMoveVector)
Function Move moves the rectangle by the aMoveVector.
wxString m_Text
Definition: eda_text.h:374
const wxPoint GetOrigin() const
Definition: eda_rect.h:112
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
Definition: eda_text.cpp:80
PNG memory record (file in memory).
Definition: bitmap_types.h:43
int GetPenSizeForBold(int aTextSize)
Function GetPensizeForBold.
void GRSetDrawMode(wxDC *DC, GR_DRAWMODE draw_mode)
Definition: gr_basic.cpp:223
const wxPoint & GetTextPos() const
Definition: eda_text.h:237
bool IsItalic() const
Definition: eda_text.h:183
#define TEXT_ANGLE_VERT
void Move(const wxPoint &aPosition) override
Move a draw object to aPosition.
Definition: lib_text.cpp:141
Implementation of conversion functions that require both schematic and board internal units...
Define a symbol library graphical text item.
Definition: lib_text.h:44
bool HitTest(const wxPoint &aPosition) const override
Function HitTest tests if aPosition is contained within or on the bounding area of an item...
Definition: lib_text.cpp:62
void EndEdit(const wxPoint &aPosition, bool aAbort=false) override
End an object editing action.
Definition: lib_text.cpp:407
wxString GetSelectMenuText(EDA_UNITS_T aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: lib_text.cpp:367
virtual COLOR4D GetDefaultColor()
bool ContinueEdit(const wxPoint aNextPoint) override
Continue an edit in progress at aPosition.
Definition: lib_text.cpp:398
void GetMsgPanelInfo(EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
Definition: lib_text.cpp:300
void CalcEdit(const wxPoint &aPosition) override
Calculates the attributes of an item at aPosition when it is being edited.
Definition: lib_text.cpp:418
void SetEffects(const EDA_TEXT &aSrc)
Function SetEffects sets the text effects from another instance.
Definition: eda_text.cpp:55
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
Definition: lib_text.cpp:147
wxPoint GetPosition() const override
Return the current draw object position.
Definition: lib_text.h:117
int color
Definition: DXF_plotter.cpp:62
int GetTextWidth() const
Definition: eda_text.h:231
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
void SetTextPos(const wxPoint &aPoint)
Definition: eda_text.h:236
bool IsSelected() const
Definition: base_struct.h:224
bool InEditMode() const
Return the draw item editing mode status.
void SetOrigin(const wxPoint &pos)
Definition: eda_rect.h:124
int m_Unit
Unit identification for multiple parts per package.
int x1
Definition: transform.h:48
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:227
virtual EDA_RECT * GetClipBox()
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216
void Rotate() override
Rotate the draw item.
Definition: lib_text.cpp:337
void RevertYAxis()
Function RevertYAxis Mirror the rectangle from the X axis (negate Y pos and size) ...
Definition: eda_rect.h:144
bool Inside(EDA_RECT &aRect) const override
Test if any part of the draw object is inside rectangle bounds of aRect.
Definition: lib_text.cpp:135
void DrawGraphicText(EDA_RECT *aClipBox, wxDC *aDC, const wxPoint &aPos, COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, void(*aCallback)(int x0, int y0, int xf, int yf, void *aData), void *aCallbackData, PLOTTER *aPlotter)
Function DrawGraphicText Draw a graphic text (like module texts)
bool IsBold() const
Definition: eda_text.h:186
double GetTextAngle() const
Definition: eda_text.h:177
The base class for drawable items used by schematic library components.
Definition: lib_draw_item.h:67
int GetThickness() const
Function GetThickness returns pen width.
Definition: eda_text.h:167
void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers() Returns the all the layers within the VIEW the object is painted on...
Definition: lib_text.cpp:55
This file contains miscellaneous commonly used macros and functions.
virtual void Text(const wxPoint &aPos, const COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=NULL)
Draws text with the plotter.
void SetTextX(int aX)
Definition: eda_text.h:239
virtual wxString GetShownText() const
Returns the string actually shown after processing of the base text.
Definition: eda_text.h:148
wxString MessageTextFromValue(EDA_UNITS_T aUnits, int aValue, bool aUseMils)
Definition: base_units.cpp:125
#define IS_NEW
New item, just created.
Definition: base_struct.h:114
Class EDA_TEXT is a mix-in class (via multiple inheritance) that handles texts such as labels...
Definition: eda_text.h:127
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
int y1
Definition: transform.h:49
void GRRect(EDA_RECT *aClipBox, wxDC *aDC, int x1, int y1, int x2, int y2, COLOR4D aColor)
Definition: gr_basic.cpp:1003
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
EDA_RECT GetTextBox(int aLine=-1, int aThickness=-1, bool aInvertY=false) const
Function GetTextBox useful in multiline texts to calculate the full text or a line area (for zones fi...
Definition: eda_text.cpp:103
virtual bool TextHitTest(const wxPoint &aPoint, int aAccuracy=0) const
Function TextHitTest Test if aPoint is within the bounds of this object.
Definition: eda_text.cpp:255
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
void SetEnd(int x, int y)
Definition: eda_rect.h:134
void SetOffset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
Definition: lib_text.cpp:129
Define a library symbol object.
unsigned STATUS_FLAGS
Definition: base_struct.h:147
bool m_rotate
Flag to indicate a rotation occurred while editing.
Definition: lib_text.h:47
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
Definition: lib_text.cpp:159
wxPoint Centre() const
Definition: eda_rect.h:60
bool GetColorMode() const
Definition: plotter.h:131
const wxPoint GetEnd() const
Definition: eda_rect.h:114
int GetPenSize() const override
Definition: lib_text.cpp:213
wxString m_savedText
Temporary storage for the string when editing.
Definition: lib_text.h:46
Base plotter engine class.
Definition: plotter.h:97
bool Intersects(const EDA_RECT &aRect) const
Function Intersects tests for a common area between rectangles.
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
Definition: lib_text.cpp:373
TRANSFORM DefaultTransform
Definition: eeschema.cpp:59
void drawGraphic(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, COLOR4D aColor, GR_DRAWMODE aDrawMode, void *aData, const TRANSFORM &aTransform) override
Draw the item on aPanel.
Definition: lib_text.cpp:231
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
const EDA_RECT GetBoundingBox() const override
Definition: lib_text.cpp:312
wxPoint m_initialPos
Temporary position when moving an existing item.
void SetText(const wxString &aText) override
Sets the text item string to aText.
Definition: lib_text.cpp:350
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:178
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:102
int m_Convert
Shape identification for alternate body styles.
int GetTextHeight() const
Definition: eda_text.h:234
COLOR4D GetItemSelectedColor()
#define DBG(x)
Definition: fctsys.h:33
static const char * text_xpm[]
Definition: colors.h:45
const wxSize & GetTextSize() const
Definition: eda_text.h:228
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: lib_text.cpp:87
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
Message panel definition file.
bool m_updateText
Flag to indicate text change occurred while editing.
Definition: lib_text.h:48
LIB_TEXT(LIB_PART *aParent)
Definition: lib_text.cpp:45
EDA_UNITS_T
Definition: common.h:159
int compare(const LIB_ITEM &aOther) const override
Provide the draw object specific comparison called by the == and < operators.
Definition: lib_text.cpp:102
void SetTextY(int aY)
Definition: eda_text.h:240
wxPoint m_initialCursorPos
Initial cursor position at the beginning of a move.
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
#define IS_MOVED
Item being moved.
Definition: base_struct.h:113