Commit b752cfde authored by Marco Mattila's avatar Marco Mattila
Browse files

Add edit menu and right-click menu items to pcbnew for resetting module and...

Add edit menu and right-click menu items to pcbnew for resetting module and other text field sizes to current defaults set in Preferences->Dimensions->Texts and Drawings.
parent 58dcc12e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -344,6 +344,7 @@ set(BITMAP_SRCS
    red.xpm
    red.xpm
    reload2.xpm
    reload2.xpm
    reload.xpm
    reload.xpm
    Reset_Text.xpm
    Resize_Sheet.xpm
    Resize_Sheet.xpm
    right.xpm
    right.xpm
    Rotate_Field.xpm
    Rotate_Field.xpm

bitmaps/Reset_Text.xpm

0 → 100644
+27 −0
Original line number Original line Diff line number Diff line
/* XPM */
#ifndef XPMMAIN
extern const char *reset_text_xpm[];

#else
const char * reset_text_xpm[] = {
"16 16 3 1",
" 	c None",
".	c #00009B",
"+	c #ACACAC",
"                ",
"                ",
"           ...+ ",
"            .++ ",
"        ... .+  ",
"         ..+.+  ",
"        . .+++  ",
"       . + +    ",
" .....  +       ",
"   .+++         ",
"   .+           ",
"   .+           ",
"   .+           ",
"   .+           ",
"   .+           ",
"   ++           "};
#endif
+29 −1
Original line number Original line Diff line number Diff line
@@ -655,6 +655,34 @@ public:
    EDA_TextStruct( const EDA_TextStruct& aText );
    EDA_TextStruct( const EDA_TextStruct& aText );
    virtual ~EDA_TextStruct();
    virtual ~EDA_TextStruct();


    /**
     * Function SetThickness
     * sets text thickness.
     * @param aNewThickness is the new text thickness.
     */
    void SetThickness( int aNewThickness ) { m_Thickness = aNewThickness; };

    /**
     * Function GetThickness
     * returns text thickness.
     * @return int - text thickness.
     */
    int GetThickness() const { return m_Thickness; };

    /**
     * Function SetSize
     * sets text size.
     * @param aNewSize is the new text size.
     */
    void SetSize( wxSize aNewSize ) { m_Size = aNewSize; };

    /**
     * Function GetSize
     * returns text size.
     * @return wxSize - text size.
     */
    wxSize GetSize() const { return m_Size; };

    int GetLength() const { return m_Text.Length(); };
    int GetLength() const { return m_Text.Length(); };


    /**
    /**
+1 −0
Original line number Original line Diff line number Diff line
@@ -338,6 +338,7 @@ extern const char* red_xpm[];
extern const char* reload2_xpm[];
extern const char* reload2_xpm[];
extern const char* reload_xpm[];
extern const char* reload_xpm[];
extern const char* repaint_xpm[];
extern const char* repaint_xpm[];
extern const char* reset_text_xpm[];
extern const char* resize_sheet_xpm[];
extern const char* resize_sheet_xpm[];
extern const char* right_xpm[];
extern const char* right_xpm[];
extern const char* rotate_field_xpm[];
extern const char* rotate_field_xpm[];
+18 −0
Original line number Original line Diff line number Diff line
@@ -256,6 +256,24 @@ public:
                                        wxDC*         DC );
                                        wxDC*         DC );
    TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
    TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );


    /**
     * Function ResetTextSize
     * resets given field text size and width to current settings in
     * Preferences->Dimensions->Texts and Drawings.
     * @param aItem is the item to be reset, either TEXTE_PCB or TEXTE_MODULE.
     * @param aDC is the drawing context.
     */
    void          ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC );

    /**
     * Function ResetModuleTextSizes
     * resets text size and width of all module text fields of given field
     * type to current settings in Preferences->Dimensions->Texts and Drawings.
     * @param aType is the field type (TEXT_is_REFERENCE, TEXT_is_VALUE, or TEXT_is_DIVERS).
     * @param aDC is the drawing context.
     */
    void          ResetModuleTextSizes( int aType, wxDC* aDC );

    void          InstallPadOptionsFrame( D_PAD*         pad );
    void          InstallPadOptionsFrame( D_PAD*         pad );
    void          InstallTextModOptionsFrame( TEXTE_MODULE* TextMod,
    void          InstallTextModOptionsFrame( TEXTE_MODULE* TextMod,
                                              wxDC*         DC );
                                              wxDC*         DC );
Loading