Refactor PCBNew selection clarification menu icon code.
* Move clarification menu icon code from base board item object to the appropriate object. * Remove left over French comments. * Coding policy fixes.
This commit is contained in:
parent
81ddf0bb56
commit
f60c982397
|
@ -15,7 +15,7 @@ enum Track_Shapes {
|
|||
S_RECT, /* segment with non rounded ends */
|
||||
S_ARC, /* Arcs (with rounded ends) */
|
||||
S_CIRCLE, /* ring */
|
||||
S_POLYGON, /* polygonal shape (not yet used for tracks, but could be in microwave apps) */
|
||||
S_POLYGON, /* polygon (not yet used for tracks, but could be in microwave apps) */
|
||||
S_CURVE, /* Bezier Curve */
|
||||
S_LAST /* last value for this list */
|
||||
};
|
||||
|
@ -69,8 +69,7 @@ public:
|
|||
/**
|
||||
* Function GetPosition
|
||||
* returns the position of this object.
|
||||
* @return wxPoint& - The position of this object, non-const so it
|
||||
* can be changed
|
||||
* @return wxPoint& - The position of this object, non-const so it can be changed
|
||||
*/
|
||||
virtual wxPoint& GetPosition() = 0;
|
||||
|
||||
|
@ -85,7 +84,7 @@ public:
|
|||
* sets the layer this item is on.
|
||||
* @param aLayer The layer number.
|
||||
* is virtual because some items (in fact: class DIMENSION)
|
||||
* have a slightly different initialisation
|
||||
* have a slightly different initialization
|
||||
*/
|
||||
virtual void SetLayer( int aLayer ) { m_Layer = aLayer; }
|
||||
|
||||
|
@ -139,7 +138,6 @@ public:
|
|||
*/
|
||||
virtual void UnLink();
|
||||
|
||||
|
||||
/**
|
||||
* Function DeleteStructure
|
||||
* deletes this object after UnLink()ing it from its owner.
|
||||
|
@ -151,22 +149,12 @@ public:
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function MenuIcon
|
||||
* @return const char** - The XPM to use in any UI control which can help
|
||||
* identify this item.
|
||||
* @todo: make this virtual and split into each derived class
|
||||
*/
|
||||
const char** MenuIcon() const;
|
||||
|
||||
|
||||
/**
|
||||
* Function ShowShape
|
||||
* converts the enum Track_Shapes integer value to a wxString.
|
||||
*/
|
||||
static wxString ShowShape( Track_Shapes aShape );
|
||||
|
||||
|
||||
/**
|
||||
* Function Save
|
||||
* writes the data structures for this object out to a FILE in "*.brd" format.
|
||||
|
@ -175,7 +163,7 @@ public:
|
|||
*/
|
||||
virtual bool Save( FILE* aFile ) const = 0;
|
||||
|
||||
// Some geometric transforms, that must be rewrittem for derived classes
|
||||
// Some geometric transforms, that must be rewritten for derived classes
|
||||
/**
|
||||
* Function Move
|
||||
* move this object.
|
||||
|
@ -238,8 +226,8 @@ class BOARD_CONNECTED_ITEM : public BOARD_ITEM
|
|||
protected:
|
||||
int m_NetCode; // Net number
|
||||
|
||||
int m_Subnet; /* In rastnest routines : for the current net,
|
||||
* block number (number common to the current connected items found)
|
||||
int m_Subnet; /* In rastnest routines : for the current net, block number
|
||||
* (number common to the current connected items found)
|
||||
*/
|
||||
|
||||
int m_ZoneSubnet; // variable used in rastnest computations : for the current net,
|
||||
|
@ -270,7 +258,6 @@ public:
|
|||
int GetZoneSubNet() const;
|
||||
void SetZoneSubNet( int aSubNetCode );
|
||||
|
||||
|
||||
/**
|
||||
* Function GetClearance
|
||||
* returns the clearance in 1/10000 inches. If \a aItem is not NULL then the
|
||||
|
@ -406,10 +393,10 @@ public:
|
|||
{
|
||||
if( GetCount() )
|
||||
return Remove( GetCount()-1 );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif /* BOARD_ITEM_STRUCT_H */
|
||||
|
||||
|
|
|
@ -3,16 +3,9 @@
|
|||
/******************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "pcbnew.h"
|
||||
|
||||
#include "pcbnew_id.h"
|
||||
#include "collectors.h"
|
||||
|
||||
#include "bitmaps.h"
|
||||
|
||||
|
||||
wxString BOARD_ITEM::ShowShape( Track_Shapes aShape )
|
||||
{
|
||||
|
@ -23,85 +16,17 @@ wxString BOARD_ITEM::ShowShape( Track_Shapes aShape )
|
|||
case S_ARC: return _( "Arc" );
|
||||
case S_CIRCLE: return _( "Circle" );
|
||||
case S_CURVE: return _( "Bezier Curve" );
|
||||
case S_POLYGON: return wxT( "polygon" );
|
||||
case S_POLYGON: return _( "Polygon" );
|
||||
default: return wxT( "??" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** return a specific icon pointer (an xpm icon) for "this". Used in pop up menus
|
||||
* @return an icon pointer (can be NULL)
|
||||
*/
|
||||
const char** BOARD_ITEM::MenuIcon() const
|
||||
{
|
||||
const char** xpm;
|
||||
const BOARD_ITEM* item = this;
|
||||
|
||||
switch( item->Type() )
|
||||
{
|
||||
case TYPE_MODULE:
|
||||
xpm = module_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_PAD:
|
||||
xpm = pad_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_DRAWSEGMENT:
|
||||
xpm = add_dashed_line_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_TEXTE:
|
||||
xpm = add_text_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_TEXTE_MODULE:
|
||||
xpm = footprint_text_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_EDGE_MODULE:
|
||||
xpm = show_mod_edge_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_TRACK:
|
||||
xpm = showtrack_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_ZONE_CONTAINER:
|
||||
case TYPE_ZONE:
|
||||
xpm = add_zone_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_VIA:
|
||||
xpm = via_sketch_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_MARKER_PCB:
|
||||
xpm = pad_xpm; // @todo: create and use marker xpm
|
||||
break;
|
||||
|
||||
case TYPE_DIMENSION:
|
||||
xpm = add_dimension_xpm;
|
||||
break;
|
||||
|
||||
case TYPE_MIRE:
|
||||
xpm = add_mires_xpm;
|
||||
break;
|
||||
|
||||
default:
|
||||
xpm = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return (const char**) xpm;
|
||||
}
|
||||
|
||||
|
||||
void BOARD_ITEM::UnLink()
|
||||
{
|
||||
DLIST<BOARD_ITEM>* list = (DLIST<BOARD_ITEM>*) GetList();
|
||||
wxASSERT( list );
|
||||
|
||||
if( list )
|
||||
list->Remove( this );
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
/*****************************/
|
||||
/******************************/
|
||||
/* DIMENSION class definition */
|
||||
/*****************************/
|
||||
/******************************/
|
||||
|
||||
#ifndef DIMENSION_H
|
||||
#define DIMENSION_H
|
||||
|
||||
#include "base_struct.h"
|
||||
#include "richio.h"
|
||||
|
||||
|
||||
class DIMENSION : public BOARD_ITEM
|
||||
{
|
||||
public:
|
||||
|
@ -136,6 +138,8 @@ public:
|
|||
EDA_RECT GetBoundingBox() const;
|
||||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_dimension_xpm; }
|
||||
};
|
||||
|
||||
#endif // #define DIMENSION_H
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
|
||||
#ifndef CLASS_DRAWSEGMENT_H
|
||||
#define CLASS_DRAWSEGMENT_H
|
||||
|
||||
#include "PolyLine.h"
|
||||
#include "richio.h"
|
||||
|
||||
|
||||
class DRAWSEGMENT : public BOARD_ITEM
|
||||
{
|
||||
public:
|
||||
|
@ -166,7 +168,7 @@ public:
|
|||
* @param aClearanceValue = the clearance around the pad
|
||||
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
|
||||
* @param aCorrectionFactor = the correction to apply to circles radius to keep
|
||||
* clearance when the circle is approxiamted by segment bigger or equal
|
||||
* clearance when the circle is approximated by segment bigger or equal
|
||||
* to the real clearance value (usually near from 1.0)
|
||||
*/
|
||||
void TransformShapeWithClearanceToPolygon( std::vector <CPolyPt>& aCornerBuffer,
|
||||
|
@ -176,6 +178,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_dashed_line_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os );
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
/* class_edge_module.h : EDGE_MODULE class definition. */
|
||||
/*******************************************************/
|
||||
|
||||
#ifndef CLASS_DRAWSEGMENT_H
|
||||
#define _CLASS_EDGE_MOD_H_
|
||||
|
||||
#include "richio.h"
|
||||
|
||||
class Pcb3D_GLCanvas;
|
||||
|
@ -155,6 +158,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) show_mod_edge_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
/**
|
||||
|
@ -168,3 +173,5 @@ public:
|
|||
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // _CLASS_EDGE_MOD_H_
|
||||
|
|
|
@ -116,6 +116,8 @@ public:
|
|||
}
|
||||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) drc_xpm; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/****************************************************/
|
||||
/* MIREPCB class definition. (targets for photos) */
|
||||
/****************************************************/
|
||||
|
||||
#ifndef MIRE_H
|
||||
#define MIRE_H
|
||||
|
||||
|
@ -90,6 +91,8 @@ public:
|
|||
EDA_RECT GetBoundingBox() const;
|
||||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_mires_xpm; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3,11 +3,16 @@
|
|||
/*******************************************************/
|
||||
|
||||
|
||||
#ifndef _MODULE_H_
|
||||
#define _MODULE_H_
|
||||
|
||||
|
||||
class Pcb3D_GLCanvas;
|
||||
class S3D_MASTER;
|
||||
|
||||
#include "richio.h"
|
||||
|
||||
|
||||
/************************************/
|
||||
/* Modules (footprints) description */
|
||||
/* pad are in class_pad.xx */
|
||||
|
@ -330,6 +335,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) module_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
/**
|
||||
|
@ -343,3 +350,6 @@ public:
|
|||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif // _MODULE_H_
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
/* class_pad.h : Pads description */
|
||||
/**********************************/
|
||||
|
||||
#ifndef _PAD_H_
|
||||
#define _PAD_H_
|
||||
|
||||
|
||||
class Pcb3D_GLCanvas;
|
||||
|
||||
#include "pad_shapes.h"
|
||||
|
@ -13,8 +17,8 @@ class Pcb3D_GLCanvas;
|
|||
*/
|
||||
|
||||
// PAD_STANDARD:
|
||||
#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | \
|
||||
SOLDERMASK_LAYER_FRONT
|
||||
#define PAD_STANDARD_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | \
|
||||
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
|
||||
|
||||
// PAD_CONN:
|
||||
#define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT
|
||||
|
@ -26,13 +30,15 @@ class Pcb3D_GLCanvas;
|
|||
#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS LAYER_BACK | SILKSCREEN_LAYER_FRONT | \
|
||||
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
|
||||
|
||||
|
||||
// Helper class to store parameters used to draw a pad
|
||||
class PAD_DRAWINFO
|
||||
{
|
||||
public:
|
||||
EDA_DRAW_PANEL * m_DrawPanel; // the EDA_DRAW_PANEL used to draw a PAD ; can be null
|
||||
int m_DrawMode; // the draw mode
|
||||
int m_Color; // color used to draw the pad shape , from pad layers and visible layers
|
||||
int m_Color; // color used to draw the pad shape , from pad layers and
|
||||
// visible layers
|
||||
int m_HoleColor; // color used to draw the pad hole
|
||||
int m_PadClearance; // clearance value, used to draw the pad area outlines
|
||||
wxSize m_Mask_margin; // margin, used to draw solder paste when only one layer is shown
|
||||
|
@ -60,8 +66,8 @@ public:
|
|||
union
|
||||
{
|
||||
unsigned long m_NumPadName;
|
||||
char m_Padname[4]; /* Pad name (4 char) or a long identifier
|
||||
* (used in pad name comparisons because this is faster than string comparison)
|
||||
char m_Padname[4]; /* Pad name (4 char) or a long identifier (used in pad name
|
||||
* comparisons because this is faster than string comparison)
|
||||
*/
|
||||
};
|
||||
|
||||
|
@ -72,8 +78,9 @@ public:
|
|||
int m_PadShape; // Shape: PAD_CIRCLE, PAD_RECT, PAD_OVAL, PAD_TRAPEZOID
|
||||
int m_DrillShape; // Shape PAD_CIRCLE, PAD_OVAL
|
||||
|
||||
wxSize m_Drill; // Drill diam (drill shape = PAD_CIRCLE) or drill size(shape = OVAL)
|
||||
// for drill shape = PAD_CIRCLE, drill diam = m_Drill.x
|
||||
wxSize m_Drill; // Drill diam (drill shape = PAD_CIRCLE) or drill size
|
||||
// (shape = OVAL) for drill shape = PAD_CIRCLE, drill
|
||||
// diam = m_Drill.x
|
||||
|
||||
wxSize m_Offset; /* This parameter is useful only for oblong pads (it can be used for other
|
||||
* shapes, but without any interest).
|
||||
|
@ -92,7 +99,8 @@ public:
|
|||
|
||||
wxSize m_DeltaSize; // delta on rectangular shapes
|
||||
|
||||
wxPoint m_Pos0; // Initial Pad position (i.e. pas position relative to the module anchor, orientation 0
|
||||
wxPoint m_Pos0; // Initial Pad position (i.e. pas position relative to the
|
||||
// module anchor, orientation 0
|
||||
|
||||
int m_ShapeMaxRadius; // radius of the circle containing the pad shape
|
||||
int m_Attribut; // NORMAL, PAD_SMD, PAD_CONN
|
||||
|
@ -181,7 +189,9 @@ public:
|
|||
* to the real clearance value (usually near from 1.0)
|
||||
*/
|
||||
void TransformShapeWithClearanceToPolygon( std::vector <CPolyPt>& aCornerBuffer,
|
||||
int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor );
|
||||
int aClearanceValue,
|
||||
int aCircleToSegmentsCount,
|
||||
double aCorrectionFactor );
|
||||
|
||||
/**
|
||||
* Function GetClearance
|
||||
|
@ -256,7 +266,8 @@ public:
|
|||
* Build the Corner list of the polygonal shape,
|
||||
* depending on shape, extra size (clearance ...) and orientation
|
||||
* @param aCoord = a buffer to fill (4 corners).
|
||||
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
|
||||
* @param aInflateValue = wxSize: the clearance or margin value. value > 0:
|
||||
* inflate, < 0 deflate
|
||||
* @param aRotation = full rotation of the polygon
|
||||
*/
|
||||
void BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotation ) const;
|
||||
|
@ -267,7 +278,8 @@ public:
|
|||
* Build an equivalent segment having the same shape as the OVAL shape,
|
||||
* Useful in draw function and in DRC and HitTest functions,
|
||||
* because segments are already well handled by track tests
|
||||
* @param aSegStart = the starting point of the equivalent segment, relative to the shape position.
|
||||
* @param aSegStart = the starting point of the equivalent segment relative to the shape
|
||||
* position.
|
||||
* @param aSegEnd = the ending point of the equivalent segment, relative to the shape position
|
||||
* @param aRotation = full rotation of the segment
|
||||
* @return the width of the segment
|
||||
|
@ -284,7 +296,6 @@ public:
|
|||
|
||||
const wxPoint ReturnShapePos();
|
||||
|
||||
|
||||
/**
|
||||
* Function GetNet
|
||||
* @return int - the netcode
|
||||
|
@ -302,7 +313,6 @@ public:
|
|||
*/
|
||||
void DisplayInfo( EDA_DRAW_FRAME* frame );
|
||||
|
||||
|
||||
/**
|
||||
* Function IsOnLayer
|
||||
* tests to see if this object is on the given layer. Is virtual so
|
||||
|
@ -313,7 +323,6 @@ public:
|
|||
*/
|
||||
bool IsOnLayer( int aLayer ) const;
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTest
|
||||
* tests if the given wxPoint is within the bounds of this object.
|
||||
|
@ -359,6 +368,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) pad_xpm; }
|
||||
|
||||
/**
|
||||
* Function ShowPadShape
|
||||
* @return the name of the shape
|
||||
|
@ -386,3 +397,10 @@ public:
|
|||
};
|
||||
|
||||
typedef class D_PAD* LISTE_PAD;
|
||||
|
||||
|
||||
/* LocalWords: eeschema vout
|
||||
*/
|
||||
|
||||
|
||||
#endif // _PAD_H_
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/********************************/
|
||||
/* TEXTE_PCB class definition. */
|
||||
/********************************/
|
||||
|
||||
#ifndef CLASS_PCB_TEXT_H
|
||||
#define CLASS_PCB_TEXT_H
|
||||
|
||||
|
@ -8,6 +9,7 @@
|
|||
#include "PolyLine.h"
|
||||
#include "richio.h"
|
||||
|
||||
|
||||
class TEXTE_PCB : public BOARD_ITEM, public EDA_TEXT
|
||||
{
|
||||
public:
|
||||
|
@ -131,6 +133,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_text_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
/**
|
||||
* Function Show
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#define UMBILICAL_COLOR LIGHTBLUE
|
||||
|
||||
|
||||
class TEXTE_MODULE : public BOARD_ITEM, public EDA_TEXT
|
||||
{
|
||||
/* Note: orientation in 1/10 deg relative to the footprint
|
||||
|
@ -21,7 +22,7 @@ class TEXTE_MODULE : public BOARD_ITEM, public EDA_TEXT
|
|||
*/
|
||||
public:
|
||||
wxPoint m_Pos0; // text coordinates relatives to the footprint
|
||||
// ancre, orient 0
|
||||
// anchor, orient 0
|
||||
// Text coordinate ref point is the text centre
|
||||
char m_Type; // 0: ref,1: val, others = 2..255
|
||||
bool m_NoShow; // true = invisible
|
||||
|
@ -46,8 +47,6 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
|
|||
|
||||
void Copy( TEXTE_MODULE* source ); // copy structure
|
||||
|
||||
/* Gestion du texte */
|
||||
|
||||
int GetLength() const; /* text length */
|
||||
|
||||
int GetDrawRotation() const; // Return text rotation for drawings and plotting
|
||||
|
@ -161,6 +160,8 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) footprint_text_xpm; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
// Via attributes (m_Shape parameter)
|
||||
#define VIA_THROUGH 3 /* Always a through hole via */
|
||||
#define VIA_BLIND_BURIED 2 /* this via can be on internal layers */
|
||||
#define VIA_MICROVIA 1 /* this via which connect from an external layer to the near neighbor internal layer */
|
||||
#define VIA_MICROVIA 1 /* this via which connect from an external layer
|
||||
* to the near neighbor internal layer */
|
||||
#define VIA_NOT_DEFINED 0 /* not yet used */
|
||||
|
||||
/***/
|
||||
|
@ -287,6 +288,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) showtrack_xpm; }
|
||||
|
||||
#if defined (DEBUG)
|
||||
|
||||
/**
|
||||
|
@ -330,6 +333,7 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_zone_xpm; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -386,6 +390,8 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) via_sketch_xpm; }
|
||||
|
||||
#if defined (DEBUG)
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "richio.h"
|
||||
#include "class_zone_setting.h"
|
||||
|
||||
|
||||
/* a small class used when filling areas with segments */
|
||||
class SEGMENT
|
||||
{
|
||||
|
@ -26,6 +27,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/************************/
|
||||
/* class ZONE_CONTAINER */
|
||||
/************************/
|
||||
|
@ -427,6 +429,7 @@ public:
|
|||
|
||||
virtual wxString GetSelectMenuText() const;
|
||||
|
||||
virtual const char** GetMenuImage() const { return (const char**) add_zone_xpm; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/********************************************************/
|
||||
/* Routines generales de gestion des commandes usuelles */
|
||||
/********************************************************/
|
||||
|
||||
/****************/
|
||||
/* controle.cpp */
|
||||
/****************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
|
@ -14,7 +12,7 @@
|
|||
|
||||
#include "collectors.h"
|
||||
|
||||
//external funtions used here:
|
||||
//external functions used here:
|
||||
extern bool Magnetize( BOARD* m_Pcb, PCB_EDIT_FRAME* frame,
|
||||
int aCurrentTool, wxSize grid, wxPoint on_grid, wxPoint* curpos );
|
||||
|
||||
|
@ -165,7 +163,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
|||
item = (*m_Collector)[0];
|
||||
SetCurItem( item );
|
||||
}
|
||||
// if all are modules, find the smallest one amoung the primary choices
|
||||
// if all are modules, find the smallest one among the primary choices
|
||||
else if( ( item = AllAreModulesAndReturnSmallestIfSo( m_Collector ) ) != NULL )
|
||||
{
|
||||
SetCurItem( item );
|
||||
|
@ -198,7 +196,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
|||
item = (*m_Collector)[i];
|
||||
|
||||
text = item->GetSelectMenuText();
|
||||
xpm = item->MenuIcon();
|
||||
xpm = item->GetMenuImage();
|
||||
|
||||
ADD_MENUITEM( &itemMenu, ID_POPUP_PCB_ITEM_SELECTION_START + i, text, xpm );
|
||||
}
|
||||
|
@ -270,25 +268,25 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
|
||||
switch( aHotKey )
|
||||
{
|
||||
case WXK_NUMPAD8: /* Deplacement curseur vers le haut */
|
||||
case WXK_NUMPAD8:
|
||||
case WXK_UP:
|
||||
pos.y -= wxRound( gridSize.y );
|
||||
DrawPanel->MoveCursor( pos );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD2: /* Deplacement curseur vers le bas */
|
||||
case WXK_NUMPAD2:
|
||||
case WXK_DOWN:
|
||||
pos.y += wxRound( gridSize.y );
|
||||
DrawPanel->MoveCursor( pos );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD4: /* Deplacement curseur vers la gauche */
|
||||
case WXK_NUMPAD4:
|
||||
case WXK_LEFT:
|
||||
pos.x -= wxRound( gridSize.x );
|
||||
DrawPanel->MoveCursor( pos );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD6: /* Deplacement curseur vers la droite */
|
||||
case WXK_NUMPAD6:
|
||||
case WXK_RIGHT:
|
||||
pos.x += wxRound( gridSize.x );
|
||||
DrawPanel->MoveCursor( pos );
|
||||
|
|
|
@ -100,7 +100,7 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
|
|||
item = (*m_Collector)[ii];
|
||||
|
||||
text = item->GetSelectMenuText();
|
||||
xpm = item->MenuIcon();
|
||||
xpm = item->GetMenuImage();
|
||||
|
||||
ADD_MENUITEM( &itemMenu,
|
||||
ID_POPUP_PCB_ITEM_SELECTION_START + ii,
|
||||
|
|
Loading…
Reference in New Issue