Commit 83e8b961 authored by charras's avatar charras

cosmetic enhancement in pin edit dialog.

parent 82509640
...@@ -294,6 +294,28 @@ set(BITMAP_SRCS ...@@ -294,6 +294,28 @@ set(BITMAP_SRCS
Pin_Name_to.xpm Pin_Name_to.xpm
Pin_Number_to.xpm Pin_Number_to.xpm
Pin_Size_to.xpm Pin_Size_to.xpm
pinorient_right.xpm
pinorient_left.xpm
pinorient_up.xpm
pinorient_down.xpm
pinshape_normal.xpm
pinshape_invert.xpm
pinshape_clock_normal.xpm
pinshape_clock_invert.xpm
pinshape_active_low_input.xpm
pinshape_clock_active_low.xpm
pinshape_active_low_output.xpm
pintype_input.xpm
pintype_output.xpm
pintype_bidi.xpm
pintype_3states.xpm
pintype_passive.xpm
pintype_notspecif.xpm
pintype_powerinput.xpm
pintype_poweroutput.xpm
pintype_opencoll.xpm
pintype_openemit.xpm
pintype_noconnect.xpm
Pin_to.xpm Pin_to.xpm
pin.xpm pin.xpm
plot_HPG.xpm plot_HPG.xpm
......
/* XPM */
const char *pinorient_down_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" XXX ",
" X...X ",
" X...X. ",
" X...X ",
" XXX ",
" X ",
" X ",
" X ",
" X. ",
" X ",
" X ",
" X ",
" X ",
"XXXXXXXXXXXXXXX"
};
/* XPM */
const char *pinorient_left_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
"X ",
"X ",
"X ",
"X XXX ",
"X X...X ",
"XXXXXXXXXX...X ",
"X X...X ",
"X XXX ",
"X ",
"X ",
"X ",
" ",
" "
};
/* XPM */
const char *pinorient_right_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" X",
" X",
" X",
" XXX X",
" X...X X",
" X...XXXXXXXXXX",
" X...X X",
" XXX X",
" X",
" X",
" X",
" ",
" "
};
/* XPM */
const char *pinorient_up_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
"XXXXXXXXXXXXXXX",
" X ",
" X ",
" X ",
" X ",
" X ",
" X ",
" X. ",
" X ",
" XXX ",
" X...X ",
" X...X ",
" X...X ",
" XXX ",
" "
};
/* XPM */
const char *pinshape_active_low_input_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . . ",
" . ... ",
" . .. . ",
" .. . ",
" .......... ",
" . ",
" . ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_active_low_output_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" ... ",
" . .. ",
" . .. ",
" .......... ",
" . ",
" . ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_clock_active_low_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . . ",
" . ... ",
" .. .. . ",
" . .. . ",
" . .......... ",
" . . ",
" .. ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_clock_invert_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . ",
" .. ... ",
" . .. . ",
" . .. ..... ",
" . .. . ",
" .. ... ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_clock_normal_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . ",
" .. ",
" . . ",
" . .......... ",
" . . ",
" .. ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_invert_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . ",
" . ... ",
" .. . ",
" .. ..... ",
" .. . ",
" . ... ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_normal_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . ",
" . ",
" . ",
" .......... ",
" . ",
" . ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pintype_3states_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" ",
"X XXXXXXX X",
"X X X X",
"X X X X",
"X X X",
"XXXXXXXXXXXXXXX",
"X X",
"X X",
"X X",
"X X",
" ",
" ",
" "
};
/* XPM */
const char *pintype_bidi_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" ",
" ",
" XX XX ",
" XX. .XX ",
" XX.. ..XX ",
"XXXXXXXXXXXXXX ",
" XX.. ..XX ",
" XX. .XX ",
" XX XX ",
" ",
" ",
" ",
" "
};
/* XPM */
const char *pintype_input_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" X",
" X",
" XX X",
" .XX X",
" ..XX X",
"XXXXXXXXXXXXXXX",
" ..XX X",
" .XX X",
" XX X",
" X",
" X",
" ",
" "
};
/* XPM */
const char *pintype_noconnect_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #0402C4",
/* pixels */
" ",
" ",
" ",
" X",
". . X",
" . . X",
" . . X",
" .XXXXXXXXXXX",
" . . X",
" . . X",
". . X",
" X",
" ",
" ",
" "
};
/* XPM */
const char *pintype_notspecif_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" XXXX ",
" X X ",
" X X ",
" X ",
" X ",
" X ",
" X ",
"XXXXXXXXXXXXXXX",
" ",
" X ",
" X ",
" ",
" ",
" ",
" "
};
/* XPM */
const char *pintype_opencoll_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #040204",
/* pixels */
" ",
" ",
" XXXX ",
" X ",
" X ",
" X ",
" X ",
"XXXXXX ",
" X ",
" X ",
" XXXXX ",
" XXX ",
" X ",
" ..... ",
" . . . "
};
/* XPM */
const char *pintype_openemit_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #840204",
/* pixels */
" ...... ",
" . ",
" X ",
" X ",
" X ",
" X ",
" X ",
"XXXXXX ",
" X ",
" X ",
" XXXXX ",
" XXX ",
" X ",
" XXXX",
" "
};
/* XPM */
const char *pintype_output_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
"X ",
"X ",
"X XX ",
"X .XX ",
"X ..XX ",
"XXXXXXXXXXXXXX ",
"X ..XX ",
"X .XX ",
"X XX ",
"X ",
"X ",
" ",
" "
};
/* XPM */
const char *pintype_passive_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" ",
"X X",
"X X",
"X X",
"X X",
"XXXXXXXXXXXXXXX",
"X X",
"X X",
"X X",
"X X",
" ",
" ",
" "
};
/* XPM */
const char *pintype_powerinput_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
" X",
" X",
"XX XX X",
" XX .XX X",
" XXXXXXXXXXX X",
" XXXXXXXXXXXX",
" XXXXXXXXXXX X",
" XX .XX X",
"XX XX X",
" X",
" X",
" ",
" "
};
/* XPM */
const char *pintype_poweroutput_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 3 1",
" c none",
"X c #040204",
". c #C4C2C4",
/* pixels */
" ",
" ",
"X ",
"X ",
"X XXX ",
"X .XXX ",
"XXXXXXXXXXXXXX ",
"XXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXX ",
"X .XXX ",
"X XXX ",
"X ",
"X ",
" ",
" "
};
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "class_library.h" #include "class_library.h"
#include "protos.h" #include "protos.h"
#include "netlist.h" #include "netlist.h"
#include "class_pin.h"
static int AddComponentsInSheetToList( std::vector <OBJ_CMP_TO_LIST>& aComponentsList, static int AddComponentsInSheetToList( std::vector <OBJ_CMP_TO_LIST>& aComponentsList,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "general.h" #include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
#include "protos.h" #include "protos.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "program.h" #include "program.h"
#include "classes_body_items.h" #include "classes_body_items.h"
#include "class_pin.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "class_pin.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "class_pin.h"
#include "bitmaps.h"
/** /**
* Note: The following name lists are sentence capitalized per the GNOME UI * Note: The following name lists are sentence capitalized per the GNOME UI
...@@ -30,7 +32,15 @@ static const wxString pin_orientation_names[] = ...@@ -30,7 +32,15 @@ static const wxString pin_orientation_names[] =
_( "Up" ), _( "Up" ),
_( "Down" ) _( "Down" )
}; };
// bitmaps to show pins orientations in dialog editor
// must have same order than pin_orientation_names
static const char ** s_icons_Pins_Orientations[] =
{
pinorient_right_xpm,
pinorient_left_xpm,
pinorient_up_xpm,
pinorient_down_xpm,
};
static const int pin_orientation_codes[] = static const int pin_orientation_codes[] =
{ {
...@@ -56,6 +66,19 @@ static const wxString pin_style_names[] = ...@@ -56,6 +66,19 @@ static const wxString pin_style_names[] =
_( "Output low" ) _( "Output low" )
}; };
// bitmaps to show pins shapes in dialog editor
// must have same order than pin_style_names
static const char ** s_icons_Pins_Shapes[] =
{
pinshape_normal_xpm,
pinshape_invert_xpm,
pinshape_clock_normal_xpm,
pinshape_clock_invert_xpm,
pinshape_active_low_input_xpm,
pinshape_clock_active_low_xpm,
pinshape_active_low_output_xpm,
};
#define PIN_STYLE_CNT ( sizeof( pin_style_names ) / sizeof( wxString ) ) #define PIN_STYLE_CNT ( sizeof( pin_style_names ) / sizeof( wxString ) )
...@@ -87,6 +110,22 @@ static const wxString pin_electrical_type_names[] = ...@@ -87,6 +110,22 @@ static const wxString pin_electrical_type_names[] =
_( "Not connected" ) _( "Not connected" )
}; };
// bitmaps to show pins electrical type in dialog editor
// must have same order than pin_electrical_type_names
static const char ** s_icons_Pins_Electrical_Type[] =
{
pintype_input_xpm,
pintype_output_xpm,
pintype_bidi_xpm,
pintype_3states_xpm,
pintype_passive_xpm,
pintype_notspecif_xpm,
pintype_powerinput_xpm,
pintype_poweroutput_xpm,
pintype_opencoll_xpm,
pintype_openemit_xpm,
pintype_noconnect_xpm
};
#define PIN_ELECTRICAL_TYPE_CNT ( sizeof( pin_electrical_type_names ) / \ #define PIN_ELECTRICAL_TYPE_CNT ( sizeof( pin_electrical_type_names ) / \
sizeof( wxString ) ) sizeof( wxString ) )
...@@ -218,7 +257,7 @@ void LIB_PIN::SetNumber( const wxString& number ) ...@@ -218,7 +257,7 @@ void LIB_PIN::SetNumber( const wxString& number )
{ {
m_Flags |= IS_CHANGED; m_Flags |= IS_CHANGED;
} }
/* Others pin numbers marked by EnableEditMode() are not modified /* Others pin numbers marked by EnableEditMode() are not modified
* because each pin has its own number * because each pin has its own number
*/ */
...@@ -1701,3 +1740,35 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void ) ...@@ -1701,3 +1740,35 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void )
tmp.Add(wxGetTranslation(pin_electrical_type_names[ii])); tmp.Add(wxGetTranslation(pin_electrical_type_names[ii]));
return tmp; return tmp;
} }
/**
* Get a list of pin electrical type names.
* @return List of valid pin electrical type bitmaps symbols in .xpm format
* for menus and dialogs .
*/
const char*** LIB_PIN::GetElectricalTypeSymbols( void )
{
return s_icons_Pins_Electrical_Type;
}
/**
* Get a list of pin electrical type names.
*
* @return List of valid pin orientation bitmaps symbols in .xpm format
* for menus and dialogs .
*/
const char*** LIB_PIN::GetOrientationSymbols()
{
return s_icons_Pins_Orientations;
}
/**
* Get a list of pin styles bitmaps for menus and dialogs.
*
* @return List of valid pin electrical type bitmaps symbols in .xpm format.
*/
const char*** LIB_PIN::GetStyleSymbols()
{
return s_icons_Pins_Shapes;
}
This diff is collapsed.
This diff is collapsed.
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "libeditframe.h" #include "libeditframe.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
#include "classes_body_items.h" #include "classes_body_items.h"
#include "class_pin.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "eeschema_id.h" #include "eeschema_id.h"
#include "protos.h" #include "protos.h"
#include "classes_body_items.h" #include "classes_body_items.h"
#include "class_pin.h"
/***************************************************************/ /***************************************************************/
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
enum End_Type { enum End_Type {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_pin.h"
#include "protos.h" #include "protos.h"
#include "dialog_erc.h" #include "dialog_erc.h"
......
#include "fctsys.h"
#include "dialog_lib_edit_pin.h" #include "dialog_lib_edit_pin.h"
DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) : DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
DIALOG_LIB_EDIT_PIN_BASE( parent ) DIALOG_LIB_EDIT_PIN_BASE( parent )
{ {
...@@ -8,19 +11,43 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) : ...@@ -8,19 +11,43 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
} }
void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list ) void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list,
const char *** aBitmaps )
{ {
m_choiceOrientation->Append( list ); for ( unsigned ii = 0; ii < list.GetCount( ); ii++ )
{
if( aBitmaps == NULL )
m_choiceOrientation->Append(list[ii]);
else
m_choiceOrientation->Insert(list[ii],
wxBitmap(aBitmaps[ii]), ii);
}
} }
void DIALOG_LIB_EDIT_PIN::SetElectricalTypeList( const wxArrayString& list ) void DIALOG_LIB_EDIT_PIN::SetElectricalTypeList( const wxArrayString& list,
const char *** aBitmaps )
{ {
m_choiceElectricalType->Append( list ); for ( unsigned ii = 0; ii < list.GetCount( ); ii++ )
{
if( aBitmaps == NULL )
m_choiceElectricalType->Append(list[ii]);
else
m_choiceElectricalType->Insert(list[ii],
wxBitmap(aBitmaps[ii]), ii);
}
} }
void DIALOG_LIB_EDIT_PIN::SetStyleList( const wxArrayString& list ) void DIALOG_LIB_EDIT_PIN::SetStyleList( const wxArrayString& list,
const char *** aBitmaps )
{ {
m_choiceStyle->Append( list ); for ( unsigned ii = 0; ii < list.GetCount( ); ii++ )
{
if( aBitmaps == NULL )
m_choiceStyle->Append(list[ii]);
else
m_choiceStyle->Insert(list[ii],
wxBitmap(aBitmaps[ii]), ii);
}
} }
...@@ -689,10 +689,10 @@ ...@@ -689,10 +689,10 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">3</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxComboBox" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="choices"></property> <property name="choices"></property>
<property name="context_help"></property> <property name="context_help"></property>
...@@ -706,15 +706,16 @@ ...@@ -706,15 +706,16 @@
<property name="name">m_choiceOrientation</property> <property name="name">m_choiceOrientation</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="subclass"></property> <property name="style"></property>
<property name="subclass">wxBitmapComboBox; wx/bmpcbox.h</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnChoice"></event> <event name="OnCombobox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -736,6 +737,8 @@ ...@@ -736,6 +737,8 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
...@@ -958,10 +961,10 @@ ...@@ -958,10 +961,10 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">3</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxComboBox" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="choices"></property> <property name="choices"></property>
<property name="context_help"></property> <property name="context_help"></property>
...@@ -975,15 +978,16 @@ ...@@ -975,15 +978,16 @@
<property name="name">m_choiceElectricalType</property> <property name="name">m_choiceElectricalType</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="subclass"></property> <property name="style"></property>
<property name="subclass">wxBitmapComboBox; wx/bmpcbox.h</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnChoice"></event> <event name="OnCombobox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1005,6 +1009,8 @@ ...@@ -1005,6 +1009,8 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
...@@ -1100,10 +1106,10 @@ ...@@ -1100,10 +1106,10 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">3</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxComboBox" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="choices"></property> <property name="choices"></property>
<property name="context_help"></property> <property name="context_help"></property>
...@@ -1117,15 +1123,16 @@ ...@@ -1117,15 +1123,16 @@
<property name="name">m_choiceStyle</property> <property name="name">m_choiceStyle</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="subclass"></property> <property name="style"></property>
<property name="subclass">wxBitmapComboBox; wx/bmpcbox.h</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnChoice"></event> <event name="OnCombobox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
...@@ -1147,6 +1154,8 @@ ...@@ -1147,6 +1154,8 @@
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
<event name="OnSetFocus"></event> <event name="OnSetFocus"></event>
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* Subclass of DIALOG_LIB_EDIT_PIN_BASE, which is generated by wxFormBuilder. * Subclass of DIALOG_LIB_EDIT_PIN_BASE, which is generated by wxFormBuilder.
*/ */
#include "wx/bmpcbox.h"
#include "dialog_lib_edit_pin_base.h" #include "dialog_lib_edit_pin_base.h"
/** Implementing DIALOG_LIB_EDIT_PIN_BASE */ /** Implementing DIALOG_LIB_EDIT_PIN_BASE */
...@@ -15,14 +17,14 @@ public: ...@@ -15,14 +17,14 @@ public:
/** Constructor */ /** Constructor */
DIALOG_LIB_EDIT_PIN( wxWindow* parent ); DIALOG_LIB_EDIT_PIN( wxWindow* parent );
void SetOrientationList( const wxArrayString& list ); void SetOrientationList( const wxArrayString& list, const char *** aBitmaps );
void SetOrientation( int orientation ) void SetOrientation( int orientation )
{ {
m_choiceOrientation->SetSelection( orientation ); m_choiceOrientation->SetSelection( orientation );
} }
int GetOrientation( void ) { return m_choiceOrientation->GetSelection(); } int GetOrientation( void ) { return m_choiceOrientation->GetSelection(); }
void SetElectricalTypeList( const wxArrayString& list ); void SetElectricalTypeList( const wxArrayString& list, const char *** aBitmaps );
void SetElectricalType( int type ) void SetElectricalType( int type )
{ {
m_choiceElectricalType->SetSelection( type ); m_choiceElectricalType->SetSelection( type );
...@@ -32,7 +34,7 @@ public: ...@@ -32,7 +34,7 @@ public:
return m_choiceElectricalType->GetSelection(); return m_choiceElectricalType->GetSelection();
} }
void SetStyleList( const wxArrayString& list ); void SetStyleList( const wxArrayString& list, const char *** aBitmaps );
void SetStyle( int style ) { m_choiceStyle->SetSelection( style ); } void SetStyle( int style ) { m_choiceStyle->SetSelection( style ); }
int GetStyle( void ) { return m_choiceStyle->GetSelection(); } int GetStyle( void ) { return m_choiceStyle->GetSelection(); }
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "wx/bmpcbox.h"
#include "dialog_lib_edit_pin_base.h" #include "dialog_lib_edit_pin_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -69,10 +71,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -69,10 +71,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
m_staticText5->Wrap( -1 ); m_staticText5->Wrap( -1 );
fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceOrientationChoices; m_choiceOrientation = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_choiceOrientation = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceOrientationChoices, 0 ); fgSizer1->Add( m_choiceOrientation, 0, wxALL, 5 );
m_choiceOrientation->SetSelection( 0 );
fgSizer1->Add( m_choiceOrientation, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 15, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 15, 0, 1, wxEXPAND, 3 );
...@@ -94,10 +94,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -94,10 +94,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
fgSizer1->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceElectricalTypeChoices; m_choiceElectricalType = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_choiceElectricalType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceElectricalTypeChoices, 0 ); fgSizer1->Add( m_choiceElectricalType, 0, wxALL, 5 );
m_choiceElectricalType->SetSelection( 0 );
fgSizer1->Add( m_choiceElectricalType, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
...@@ -115,10 +113,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -115,10 +113,8 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
m_staticText7->Wrap( -1 ); m_staticText7->Wrap( -1 );
fgSizer1->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceStyleChoices; m_choiceStyle = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_choiceStyle = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceStyleChoices, 0 ); fgSizer1->Add( m_choiceStyle, 0, wxALL, 5 );
m_choiceStyle->SetSelection( 0 );
fgSizer1->Add( m_choiceStyle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <wx/intl.h> #include <wx/intl.h>
class wxBitmapComboBox;
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
...@@ -17,7 +19,7 @@ ...@@ -17,7 +19,7 @@
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/choice.h> #include <wx/combobox.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/button.h> #include <wx/button.h>
...@@ -46,19 +48,19 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog ...@@ -46,19 +48,19 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
wxTextCtrl* m_textNumberTextSize; wxTextCtrl* m_textNumberTextSize;
wxStaticText* m_staticNumberTextSizeUnits; wxStaticText* m_staticNumberTextSizeUnits;
wxStaticText* m_staticText5; wxStaticText* m_staticText5;
wxChoice* m_choiceOrientation; wxBitmapComboBox* m_choiceOrientation;
wxStaticText* m_staticText11; wxStaticText* m_staticText11;
wxTextCtrl* m_textLength; wxTextCtrl* m_textLength;
wxStaticText* m_staticLengthUnits; wxStaticText* m_staticLengthUnits;
wxStaticText* m_staticText6; wxStaticText* m_staticText6;
wxChoice* m_choiceElectricalType; wxBitmapComboBox* m_choiceElectricalType;
wxStaticText* m_staticText7; wxStaticText* m_staticText7;
wxChoice* m_choiceStyle; wxBitmapComboBox* m_choiceStyle;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_pin.h"
#include "protos.h" #include "protos.h"
#include "erc.h" #include "erc.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "class_pin.h"
/* functions to add commands and submenus depending on the item */ /* functions to add commands and submenus depending on the item */
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
#include "build_version.h" #include "build_version.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
#include "algorithm" #include "algorithm"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "libeditframe.h" #include "libeditframe.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "class_pin.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
...@@ -81,11 +82,14 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event ) ...@@ -81,11 +82,14 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
DIALOG_LIB_EDIT_PIN dlg( this ); DIALOG_LIB_EDIT_PIN dlg( this );
wxString units = GetUnitsLabel( g_UnitMetric ); wxString units = GetUnitsLabel( g_UnitMetric );
dlg.SetOrientationList( LIB_PIN::GetOrientationNames() ); dlg.SetOrientationList( LIB_PIN::GetOrientationNames(),
LIB_PIN::GetOrientationSymbols() );
dlg.SetOrientation( LIB_PIN::GetOrientationCodeIndex( pin->m_Orient ) ); dlg.SetOrientation( LIB_PIN::GetOrientationCodeIndex( pin->m_Orient ) );
dlg.SetStyleList( LIB_PIN::GetStyleNames() ); dlg.SetStyleList( LIB_PIN::GetStyleNames(),
LIB_PIN::GetStyleSymbols());
dlg.SetStyle( LIB_PIN::GetStyleCodeIndex( pin->m_PinShape ) ); dlg.SetStyle( LIB_PIN::GetStyleCodeIndex( pin->m_PinShape ) );
dlg.SetElectricalTypeList( LIB_PIN::GetElectricalTypeNames() ); dlg.SetElectricalTypeList( LIB_PIN::GetElectricalTypeNames(),
LIB_PIN::GetElectricalTypeSymbols());
dlg.SetElectricalType( pin->m_PinType ); dlg.SetElectricalType( pin->m_PinType );
dlg.SetName( pin->m_PinName ); dlg.SetName( pin->m_PinName );
dlg.SetNameTextSize( ReturnStringFromValue( g_UnitMetric, dlg.SetNameTextSize( ReturnStringFromValue( g_UnitMetric,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_pin.h"
/* Local Variables : */ /* Local Variables : */
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "protos.h" #include "protos.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "netlist.h" #include "netlist.h"
#include "class_pin.h"
#include "annotate_dialog.h" #include "annotate_dialog.h"
#include "dialog_build_BOM.h" #include "dialog_build_BOM.h"
......
...@@ -287,6 +287,28 @@ extern const char* pin2pin_xpm[]; ...@@ -287,6 +287,28 @@ extern const char* pin2pin_xpm[];
extern const char* pin_name_to_xpm[]; extern const char* pin_name_to_xpm[];
extern const char* pin_number_to_xpm[]; extern const char* pin_number_to_xpm[];
extern const char* pin_size_to_xpm[]; extern const char* pin_size_to_xpm[];
extern const char* pinorient_right_xpm[];
extern const char* pinorient_left_xpm[];
extern const char* pinorient_up_xpm[];
extern const char* pinorient_down_xpm[];
extern const char* pinshape_normal_xpm[];
extern const char* pinshape_invert_xpm[];
extern const char* pinshape_clock_normal_xpm[];
extern const char* pinshape_clock_invert_xpm[];
extern const char* pinshape_active_low_input_xpm[];
extern const char* pinshape_clock_active_low_xpm[];
extern const char* pinshape_active_low_output_xpm[];
extern const char* pintype_input_xpm[];
extern const char* pintype_output_xpm[];
extern const char* pintype_bidi_xpm[];
extern const char* pintype_3states_xpm[];
extern const char* pintype_passive_xpm[];
extern const char* pintype_notspecif_xpm[];
extern const char* pintype_powerinput_xpm[];
extern const char* pintype_poweroutput_xpm[];
extern const char* pintype_opencoll_xpm[];
extern const char* pintype_openemit_xpm[];
extern const char* pintype_noconnect_xpm[];
extern const char* pin_to_xpm[]; extern const char* pin_to_xpm[];
extern const char* pin_xpm[]; extern const char* pin_xpm[];
extern const char* plot_HPG_xpm[]; extern const char* plot_HPG_xpm[];
......
No preview for this file type
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment