Commit 82d5ed1e authored by Dick Hollenbeck's avatar Dick Hollenbeck

start migration to PNG, use shim function KiBitmap() and KiBitmapNew()

parent 706b267f
......@@ -339,67 +339,67 @@ void Pcb3D_GLCanvas::OnRightClick( wxMouseEvent& event )
pos.x = event.GetX(); pos.y = event.GetY();
wxMenuItem* item = new wxMenuItem( &PopUpMenu, ID_POPUP_ZOOMIN,
_( "Zoom +" ) );
item->SetBitmap( zoom_in_xpm );
item->SetBitmap( KiBitmap( zoom_in_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_ZOOMOUT,
_( "Zoom -" ) );
item->SetBitmap( zoom_out_xpm );
item->SetBitmap( KiBitmap( zoom_out_xpm ));
PopUpMenu.Append( item );
PopUpMenu.AppendSeparator();
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_ZPOS,
_( "Top View" ) );
item->SetBitmap( axis3d_top_xpm );
item->SetBitmap( KiBitmap( axis3d_top_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_ZNEG,
_( "Bottom View" ) );
item->SetBitmap( axis3d_bottom_xpm );
item->SetBitmap( KiBitmap( axis3d_bottom_xpm ));
PopUpMenu.Append( item );
PopUpMenu.AppendSeparator();
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_XPOS,
_( "Right View" ) );
item->SetBitmap( axis3d_right_xpm );
item->SetBitmap( KiBitmap( axis3d_right_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_XNEG,
_( "Left View" ) );
item->SetBitmap( axis3d_left_xpm );
item->SetBitmap( KiBitmap( axis3d_left_xpm ));
PopUpMenu.Append( item );
PopUpMenu.AppendSeparator();
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_YPOS,
_( "Front View" ) );
item->SetBitmap( axis3d_front_xpm );
item->SetBitmap( KiBitmap( axis3d_front_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_VIEW_YNEG,
_( "Back View" ) );
item->SetBitmap( axis3d_back_xpm );
item->SetBitmap( KiBitmap( axis3d_back_xpm ));
PopUpMenu.Append( item );
PopUpMenu.AppendSeparator();
item = new wxMenuItem( &PopUpMenu, ID_POPUP_MOVE3D_LEFT,
_( "Move left <-" ) );
item->SetBitmap( left_xpm );
item->SetBitmap( KiBitmap( left_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_MOVE3D_RIGHT,
_( "Move right ->" ) );
item->SetBitmap( right_xpm );
item->SetBitmap( KiBitmap( right_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_MOVE3D_UP,
_( "Move Up ^" ) );
item->SetBitmap( up_xpm );
item->SetBitmap( KiBitmap( up_xpm ));
PopUpMenu.Append( item );
item = new wxMenuItem( &PopUpMenu, ID_POPUP_MOVE3D_DOWN,
_( "Move Down" ) );
item->SetBitmap( down_xpm );
item->SetBitmap( KiBitmap( down_xpm ));
PopUpMenu.Append( item );
PopupMenu( &PopUpMenu, pos );
......
......@@ -23,7 +23,7 @@ void EDA_3D_FRAME::ReCreateHToolbar()
// Set up toolbar
m_HToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
wxBitmap( import3d_xpm ),
KiBitmap( import3d_xpm ),
_( "Reload board" ) );
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
......@@ -31,66 +31,66 @@ void EDA_3D_FRAME::ReCreateHToolbar()
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
wxBitmap( copy_button ),
KiBitmap( copy_button ),
_( "Copy 3D Image to Clipboard" ) );
#endif
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ),
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
_( "Zoom in" ) );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ),
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
_( "Zoom out" ) );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
wxBitmap( zoom_redraw_xpm ),
KiBitmap( zoom_redraw_xpm ),
_( "Redraw view" ) );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_fit_in_page_xpm ),
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
_( "Fit in page" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
wxBitmap( rotate_neg_X_xpm ),
KiBitmap( rotate_neg_X_xpm ),
_( "Rotate X <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
wxBitmap( rotate_pos_X_xpm ),
KiBitmap( rotate_pos_X_xpm ),
_( "Rotate X ->" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
wxBitmap( rotate_neg_Y_xpm ),
KiBitmap( rotate_neg_Y_xpm ),
_( "Rotate Y <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
wxBitmap( rotate_pos_Y_xpm ),
KiBitmap( rotate_pos_Y_xpm ),
_( "Rotate Y ->" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
wxBitmap( rotate_neg_Z_xpm ),
KiBitmap( rotate_neg_Z_xpm ),
_( "Rotate Z <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
wxBitmap( rotate_pos_Z_xpm ),
KiBitmap( rotate_pos_Z_xpm ),
_( "Rotate Z ->" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, wxBitmap( left_xpm ),
m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
_( "Move left <-" ) );
m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, wxBitmap( right_xpm ),
m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
_( "Move right ->" ) );
m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, wxBitmap( up_xpm ),
m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
_( "Move up ^" ) );
m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, wxBitmap( down_xpm ),
m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
_( "Move down v" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ORTHO, wxEmptyString, wxBitmap( ortho_xpm ),
m_HToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
_( "Enable/Disable orthographic projection" ),
wxITEM_CHECK );
......
......@@ -363,12 +363,12 @@ set(BITMAP_SRCS
Rotate_Pin.xpm
Rotate_CCW.xpm
Rotate_CW.xpm
rotate-x.xpm
rotate+x.xpm
rotate-y.xpm
rotate+y.xpm
rotate-z.xpm
rotate+z.xpm
rotate_neg_x.xpm
rotate_pos_x.xpm
rotate_neg_y.xpm
rotate_pos_y.xpm
rotate_neg_z.xpm
rotate_pos_z.xpm
save_as.xpm
Save_Library.xpm
Save_NetList.xpm
......
......@@ -30,10 +30,35 @@
#include "bitmaps.h"
wxBitmap Bitmap( const BITMAP_DEF& aBitmap )
#if defined(USE_PNG_BITMAPS)
wxBitmap KiBitmap( const BITMAP_DEF& aBitmap )
{
wxMemoryInputStream is( aBitmap.png, aBitmap.byteCount );
return wxBitmap( wxImage( is, wxBITMAP_TYPE_PNG, -1 ), -1 );
}
wxBitmap* KiBitmapNew( const BITMAP_DEF& aBitmap )
{
wxMemoryInputStream is( aBitmap.png, aBitmap.byteCount );
return new wxBitmap( wxImage( is, wxBITMAP_TYPE_PNG, -1 ), -1 );
}
#else
// temporary during migration to PNG. Soon the argument to these calls becomes the
// opaque BITMAP_DEF&.
wxBitmap KiBitmap( const BITMAP_DEF& aBitmap )
{
return wxBitmap( aBitmap );
}
wxBitmap* KiBitmapNew( const BITMAP_DEF& aBitmap )
{
return new wxBitmap( aBitmap );
}
#endif
......@@ -227,37 +227,37 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
* and as icon the national flag of the corresponding country.
*/
info.AddTranslator( new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ),
wxT( "Czech (CZ)" ), new wxBitmap( lang_cs_xpm ) ) );
wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Jerry Jacobs" ),
wxT( "xor.gate.engineering@gmail.com" ), wxT( "Dutch (NL)" ),
new wxBitmap( lang_nl_xpm ) ) );
KiBitmapNew( lang_nl_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ),
wxT( "Finnish (FI)" ), new wxBitmap( lang_fi_xpm ) ) );
wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Jean-Pierre Charras" ),
wxT( "jean-pierre.charras@gipsa-lab.inpg.fr" ),
wxT( "French (FR)" ), new wxBitmap( lang_fr_xpm ) ) );
wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ),
wxT( "Polish (PL)" ), new wxBitmap( lang_pl_xpm ) ) );
wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ),
wxT( "Portuguese (PT)" ), new wxBitmap( lang_pt_xpm ) ) );
wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ),
wxT( "Russian (RU)" ), new wxBitmap( lang_ru_xpm ) ) );
wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ),
wxT( "Spanish (ES)" ), new wxBitmap( lang_es_xpm ) ) );
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ),
wxT( "Spanish (ES)" ), new wxBitmap( lang_es_xpm ) ) );
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Rafael Sokolowski" ),
wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ),
new wxBitmap( lang_de_xpm ) ) );
KiBitmapNew( lang_de_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Kenta Yonekura" ),
wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ),
new wxBitmap( lang_jp_xpm ) ) );
KiBitmapNew( lang_jp_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ),
new wxBitmap( lang_gr_xpm ) ) );
KiBitmapNew( lang_gr_xpm ) ) );
info.AddTranslator( new Contributor( wxT( "Massimo Cioce" ),
wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ),
new wxBitmap( lang_it_xpm ) ) );
KiBitmapNew( lang_it_xpm ) ) );
/* TODO: are these all russian translators, placed them here now, or else align them below other language maintainer with mail adress */
info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) );
......@@ -267,11 +267,11 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
/* Programm credits for icons */
info.AddArtist( new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ),
wxT( "Icons by" ), new wxBitmap( edit_module_xpm ) ) );
wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) );
info.AddArtist( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ),
wxT( "3D modules by" ), new wxBitmap( show_3d_xpm ) ) );
wxT( "3D modules by" ), KiBitmapNew( show_3d_xpm ) ) );
info.AddArtist( new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ),
wxT( "3D modules by" ), new wxBitmap( show_3d_xpm ) ) );
wxT( "3D modules by" ), KiBitmapNew( show_3d_xpm ) ) );
}
......
......@@ -15,12 +15,12 @@
dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
: dialog_about_base(parent), info(appInfo)
{
picInformation = wxBitmap(info_xpm);
picDevelopers = wxBitmap(preference_xpm);
picDocWriters = wxBitmap(editor_xpm);
picArtists = wxBitmap(palette_xpm);
picTranslators = wxBitmap(language_xpm);
picLicense = wxBitmap(tools_xpm);
picInformation = KiBitmap( info_xpm );
picDevelopers = KiBitmap( preference_xpm );
picDocWriters = KiBitmap( editor_xpm );
picArtists = KiBitmap( palette_xpm );
picTranslators = KiBitmap( language_xpm );
picLicense = KiBitmap( tools_xpm );
m_bitmapApp->SetBitmap( info.GetIcon() );
......
......@@ -69,7 +69,7 @@ struct LANGUAGE_DESCR
int m_KI_Lang_Identifier;
/* The menu language icons */
const char** m_Lang_Icon;
const BITMAP_DEF& m_Lang_Icon;
/* Labels used in menus */
const wxChar* m_Lang_Label;
......
......@@ -156,36 +156,36 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar()
// Create options tool bar.
m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, false );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, KiBitmap( grid_xpm ),
_( "Hide grid" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
wxBitmap( polar_coord_xpm ),
KiBitmap( polar_coord_xpm ),
_( "Display polar coordinates" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
wxBitmap( unit_inch_xpm ),
KiBitmap( unit_inch_xpm ),
_( "Units in inches" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_MM, wxEmptyString,
wxBitmap( unit_mm_xpm ),
KiBitmap( unit_mm_xpm ),
_( "Units in millimeters" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
wxBitmap( cursor_shape_xpm ),
KiBitmap( cursor_shape_xpm ),
_( "Change cursor shape" ), wxITEM_CHECK );
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString,
wxBitmap( pad_sketch_xpm ),
KiBitmap( pad_sketch_xpm ),
_( "Show pads in outline mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, wxEmptyString,
wxBitmap( text_sketch_xpm ),
KiBitmap( text_sketch_xpm ),
_( "Show texts in line mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, wxEmptyString,
wxBitmap( show_mod_edge_xpm ),
KiBitmap( show_mod_edge_xpm ),
_( "Show outlines in line mode" ), wxITEM_CHECK );
m_OptionsToolBar->Realize();
......@@ -199,25 +199,25 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar()
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
m_HToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, wxBitmap( display_options_xpm ),
m_HToolBar->AddTool( ID_OPTIONS_SETUP, wxEmptyString, KiBitmap( display_options_xpm ),
_( "Display options" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ),
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
_( "Zoom in (F1)" ) );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ),
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
_( "Zoom out (F2)" ) );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ),
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ),
_( "Redraw view (F3)" ) );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_fit_in_page_xpm ),
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
_( "Zoom auto (Home)" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_SHOW3D_FRAME, wxEmptyString, wxBitmap( show_3d_xpm ),
m_HToolBar->AddTool( ID_CVPCB_SHOW3D_FRAME, wxEmptyString, KiBitmap( show_3d_xpm ),
_( "3D Display" ) );
// after adding the buttons to the toolbar, must call Realize() to reflect
......
......@@ -22,61 +22,61 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
wxBitmap( open_document_xpm ),
KiBitmap( open_document_xpm ),
_( "Open a net list file" ) );
m_HToolBar->AddTool( wxID_SAVE, wxEmptyString, wxBitmap( save_xpm ),
m_HToolBar->AddTool( wxID_SAVE, wxEmptyString, KiBitmap( save_xpm ),
_( "Save net list and footprint files" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString,
wxBitmap( config_xpm ),
KiBitmap( config_xpm ),
_( "Configuration" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
wxBitmap( show_footprint_xpm ),
KiBitmap( show_footprint_xpm ),
_( "View selected footprint" ) );
m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
wxBitmap( auto_associe_xpm ),
KiBitmap( auto_associe_xpm ),
_( "Perform automatic footprint association" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
wxBitmap( left_xpm ),
KiBitmap( left_xpm ),
_( "Select previous free component" ) );
m_HToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString,
wxBitmap( right_xpm ),
KiBitmap( right_xpm ),
_( "Select next free component" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
wxBitmap( delete_association_xpm ),
KiBitmap( delete_association_xpm ),
_( "Delete all associations" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_CVPCB_CREATE_STUFF_FILE, wxEmptyString,
wxBitmap( export_footprint_names_xpm ),
KiBitmap( export_footprint_names_xpm ),
_( "Create export file (component/footprint list, \
used by eeschema to fill the footprint field of components)" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_PCB_DISPLAY_FOOTPRINT_DOC, wxEmptyString,
wxBitmap( datasheet_xpm ),
KiBitmap( datasheet_xpm ),
_( "Display footprints list documentation" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddSeparator();
m_HToolBar->AddRadioTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
wxEmptyString,
wxBitmap( module_filtered_list_xpm ),
KiBitmap( module_filtered_list_xpm ),
wxNullBitmap,
_( "Display the filtered footprint list for the current component" ) );
m_HToolBar->AddRadioTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
wxEmptyString, wxBitmap( module_full_list_xpm ),
wxEmptyString, KiBitmap( module_full_list_xpm ),
wxNullBitmap,
_( "Display the full footprint list (without filtering)" ) );
......
......@@ -267,7 +267,7 @@ void DIALOG_ERC::ReBuildMatrixPanel()
case OK:
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
event_id,
wxBitmap( erc_green_xpm ),
KiBitmap( erc_green_xpm ),
wxPoint( x, y ) );
break;
......@@ -275,7 +275,7 @@ void DIALOG_ERC::ReBuildMatrixPanel()
case WAR:
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
event_id,
wxBitmap( warning_xpm ),
KiBitmap( warning_xpm ),
wxPoint( x, y ) );
break;
......@@ -283,7 +283,7 @@ void DIALOG_ERC::ReBuildMatrixPanel()
case ERR:
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
event_id,
wxBitmap( error_xpm ),
KiBitmap( error_xpm ),
wxPoint( x, y ) );
break;
......@@ -381,7 +381,7 @@ void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
if( new_bitmap_xpm )
{
delete Butt;
Butt = new wxBitmapButton( m_PanelERCOptions, id, wxBitmap( new_bitmap_xpm ), pos );
Butt = new wxBitmapButton( m_PanelERCOptions, id, KiBitmap( new_bitmap_xpm ), pos );
m_ButtonList[y][x] = Butt;
DiagErc[y][x] = DiagErc[x][y] = level;
......
......@@ -147,7 +147,7 @@ void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list,
if( aBitmaps == NULL )
m_choiceOrientation->Append( list[ii] );
else
m_choiceOrientation->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
m_choiceOrientation->Insert( list[ii], KiBitmap( aBitmaps[ii] ), ii );
}
}
......@@ -160,7 +160,7 @@ void DIALOG_LIB_EDIT_PIN::SetElectricalTypeList( const wxArrayString& list,
if( aBitmaps == NULL )
m_choiceElectricalType->Append( list[ii] );
else
m_choiceElectricalType->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
m_choiceElectricalType->Insert( list[ii], KiBitmap( aBitmaps[ii] ), ii );
}
}
......@@ -172,6 +172,6 @@ void DIALOG_LIB_EDIT_PIN::SetStyleList( const wxArrayString& list, const char***
if( aBitmaps == NULL )
m_choiceStyle->Append( list[ii] );
else
m_choiceStyle->Insert( list[ii], wxBitmap( aBitmaps[ii] ), ii );
m_choiceStyle->Insert( list[ii], KiBitmap( aBitmaps[ii] ), ii );
}
}
......@@ -65,8 +65,8 @@ HIERARCHY_TREE::HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent ) :
// Make an image list containing small icons
imageList = new wxImageList( 16, 15, TRUE, 2 );
imageList->Add( wxBitmap( tree_nosel_xpm ) );
imageList->Add( wxBitmap( tree_sel_xpm ) );
imageList->Add( KiBitmap( tree_nosel_xpm ) );
imageList->Add( KiBitmap( tree_sel_xpm ) );
AssignImageList( imageList );
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -32,51 +32,51 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
// Set up toolbar
m_HToolBar->AddTool( ID_LIBVIEW_SELECT_LIB, wxEmptyString,
wxBitmap( library_xpm ),
KiBitmap( library_xpm ),
_( "Select library to browse" ) );
m_HToolBar->AddTool( ID_LIBVIEW_SELECT_PART, wxEmptyString,
wxBitmap( add_component_xpm ),
KiBitmap( add_component_xpm ),
_( "Select part to browse" ) );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBVIEW_PREVIOUS, wxEmptyString,
wxBitmap( lib_previous_xpm ),
KiBitmap( lib_previous_xpm ),
_( "Display previous part" ) );
m_HToolBar->AddTool( ID_LIBVIEW_NEXT, wxEmptyString,
wxBitmap( lib_next_xpm ),
KiBitmap( lib_next_xpm ),
_( "Display next part" ) );
m_HToolBar->AddSeparator();
msg = AddHotkeyName( _( "Zoom in" ), s_Viewlib_Hokeys_Descr,
HK_ZOOM_IN, false );
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString,
wxBitmap( zoom_in_xpm ), msg );
KiBitmap( zoom_in_xpm ), msg );
msg = AddHotkeyName( _( "Zoom out" ), s_Viewlib_Hokeys_Descr,
HK_ZOOM_OUT, false );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString,
wxBitmap( zoom_out_xpm ), msg );
KiBitmap( zoom_out_xpm ), msg );
msg = AddHotkeyName( _( "Redraw view" ), s_Viewlib_Hokeys_Descr,
HK_ZOOM_REDRAW, false );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
wxBitmap( zoom_redraw_xpm ), msg );
KiBitmap( zoom_redraw_xpm ), msg );
msg = AddHotkeyName( _( "Zoom auto" ), s_Viewlib_Hokeys_Descr,
HK_ZOOM_AUTO, false );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString,
wxBitmap( zoom_fit_in_page_xpm ), msg );
KiBitmap( zoom_fit_in_page_xpm ), msg );
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, wxEmptyString,
wxBitmap( morgan1_xpm ),
KiBitmap( morgan1_xpm ),
_( "Show as \"De Morgan\" normal part" ),
wxITEM_CHECK );
m_HToolBar->AddTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, wxEmptyString,
wxBitmap( morgan2_xpm ),
KiBitmap( morgan2_xpm ),
_( "Show as \"De Morgan\" convert part" ),
wxITEM_CHECK );
......@@ -89,7 +89,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBVIEW_VIEWDOC, wxEmptyString,
wxBitmap( datasheet_xpm ),
KiBitmap( datasheet_xpm ),
_( "View component documents" ) );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false );
......@@ -98,7 +98,7 @@ void LIB_VIEW_FRAME::ReCreateHToolbar()
// The library browser is called from a "load component" command
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC,
wxEmptyString, wxBitmap( export_xpm ),
wxEmptyString, KiBitmap( export_xpm ),
_( "Insert component in schematic" ) );
}
......
......@@ -27,14 +27,14 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
// Set up toolbar
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString,
wxBitmap( gerbview_clear_layers_xpm ),
KiBitmap( gerbview_clear_layers_xpm ),
_( "Erase all layers" ) );
m_HToolBar->AddTool( wxID_FILE, wxEmptyString, wxBitmap( gerber_file_xpm ),
m_HToolBar->AddTool( wxID_FILE, wxEmptyString, KiBitmap( gerber_file_xpm ),
_( "Load a new Gerber file on the current layer. Previous data will be deleted" ) );
m_HToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString,
wxBitmap( gerbview_drill_file_xpm ),
KiBitmap( gerbview_drill_file_xpm ),
_( "Load an excellon drill file on the current layer. Previous data will be deleted" ) );
m_HToolBar->AddSeparator();
......@@ -43,16 +43,16 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
m_HToolBar->AddSeparator();
msg = AddHotkeyName( _( "Zoom in" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_IN, false );
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ), msg );
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg );
msg = AddHotkeyName( _( "Zoom out" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_OUT, false );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ), msg );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg );
msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_REDRAW, false );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, wxBitmap( zoom_redraw_xpm ), msg );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg );
msg = AddHotkeyName( _( "Zoom auto" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_AUTO, false );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_fit_in_page_xpm ), msg );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg );
m_HToolBar->AddSeparator();
......@@ -106,7 +106,7 @@ void GERBVIEW_FRAME::ReCreateVToolbar( void )
m_VToolBar = new EDA_TOOLBAR( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
// Set up toolbar
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, wxBitmap( cursor_xpm ) );
m_VToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, KiBitmap( cursor_xpm ) );
m_VToolBar->AddSeparator();
m_VToolBar->Realize();
......@@ -124,57 +124,57 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
// creation of tool bar options
m_OptionsToolBar = new EDA_TOOLBAR( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, wxBitmap( grid_xpm ),
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, KiBitmap( grid_xpm ),
_( "Turn grid off" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
wxBitmap( polar_coord_xpm ),
KiBitmap( polar_coord_xpm ),
_( "Turn polar coordinate on" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
wxBitmap( unit_inch_xpm ),
KiBitmap( unit_inch_xpm ),
_( "Set units to inches" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_MM, wxEmptyString,
wxBitmap( unit_mm_xpm ),
KiBitmap( unit_mm_xpm ),
_( "Set units to millimeters" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
wxBitmap( cursor_shape_xpm ),
KiBitmap( cursor_shape_xpm ),
_( "Change cursor shape" ), wxITEM_CHECK );
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, wxEmptyString,
wxBitmap( pad_sketch_xpm ),
KiBitmap( pad_sketch_xpm ),
_( "Show spots in sketch mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_LINES_SKETCH, wxEmptyString,
wxBitmap( showtrack_xpm ),
KiBitmap( showtrack_xpm ),
_( "Show lines in sketch mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, wxEmptyString,
wxBitmap( opt_show_polygon_xpm ),
KiBitmap( opt_show_polygon_xpm ),
_( "Show polygons in sketch mode" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_DCODES, wxEmptyString,
wxBitmap( show_dcodenumber_xpm ),
KiBitmap( show_dcodenumber_xpm ),
_( "Show dcode number" ), wxITEM_CHECK );
// tools to select draw mode in gerbview
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_0, wxEmptyString,
wxBitmap( gbr_select_mode0_xpm ),
KiBitmap( gbr_select_mode0_xpm ),
_( "Show layers in raw mode \
(could have problems with negative items when more than one gerber file is shown)" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_1, wxEmptyString,
wxBitmap( gbr_select_mode1_xpm ),
KiBitmap( gbr_select_mode1_xpm ),
_( "Show layers in stacked mode \
(show negative items without artefact, sometimes slow)" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_2, wxEmptyString,
wxBitmap( gbr_select_mode2_xpm ),
KiBitmap( gbr_select_mode2_xpm ),
_( "Show layers in tranparency mode \
(show negative items without artefact, sometimes slow)" ),
wxITEM_CHECK );
......@@ -183,7 +183,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
wxEmptyString,
wxBitmap( layers_manager_xpm ),
KiBitmap( layers_manager_xpm ),
_( "Show/hide the layers manager toolbar" ),
wxITEM_CHECK );
......
......@@ -2,12 +2,21 @@
#ifndef BITMAPS_H_
#define BITMAPS_H_
#include <wx/bitmap.h>
#define VTOOLBAR_WIDTH 26
#define TOOL_SIZE 23
#if !defined(USE_PNG_BITMAPS)
// temporary during migration to KiBitmap() and KiBitmapNew().
typedef const char** BITMAP_DEF;
#else
/// PNG memory record (file in memory).
struct BITMAP_DEF
......@@ -16,14 +25,25 @@ struct BITMAP_DEF
int byteCount;
};
#endif
/**
* Function KiBitmap
* constructs a wxBitmap from a memory record, held in a
* BITMAP_DEF.
*/
wxBitmap KiBitmap( const BITMAP_DEF& aBitmap );
/**
* Function Bitmap
* constructs a wxBitmap from a PNG memory record, held in a
* BITMAP_DEF. This name and interface is chose to ease migration
* into PNG usage from XPM usage.
* Function KiBitmapNew
* allocates a wxBitmap on heap from a memory record, held in a
* BITMAP_DEF.
*
* @return wxBitmap* - caller owns it.
*/
wxBitmap Bitmap( const BITMAP_DEF& aBitmap );
wxBitmap* KiBitmapNew( const BITMAP_DEF& aBitmap );
// Please keep list sorted alphabetically, ignoring case.
......
......@@ -30,15 +30,15 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) :
// Make an image list containing small icons
m_ImageList = new wxImageList( 16, 16, TRUE, TREE_MAX );
m_ImageList->Add( wxBitmap( kicad_icon_small_xpm ) ); // TREE_PROJECT
m_ImageList->Add( wxBitmap( eeschema_xpm ) ); // TREE_SCHEMA
m_ImageList->Add( wxBitmap( pcbnew_xpm ) ); // TREE_PCB
m_ImageList->Add( wxBitmap( icon_gerbview_small_xpm ) ); // TREE_GERBER
m_ImageList->Add( wxBitmap( datasheet_xpm ) ); // TREE_PDF
m_ImageList->Add( wxBitmap( icon_txt_xpm ) ); // TREE_TXT
m_ImageList->Add( wxBitmap( icon_cvpcb_small_xpm ) ); // TREE_NET
m_ImageList->Add( wxBitmap( unknown_xpm ) ); // TREE_UNKNOWN
m_ImageList->Add( wxBitmap( directory_xpm ) ); // TREE_DIRECTORY
m_ImageList->Add( KiBitmap( kicad_icon_small_xpm ) ); // TREE_PROJECT
m_ImageList->Add( KiBitmap( eeschema_xpm ) ); // TREE_SCHEMA
m_ImageList->Add( KiBitmap( pcbnew_xpm ) ); // TREE_PCB
m_ImageList->Add( KiBitmap( icon_gerbview_small_xpm ) ); // TREE_GERBER
m_ImageList->Add( KiBitmap( datasheet_xpm ) ); // TREE_PDF
m_ImageList->Add( KiBitmap( icon_txt_xpm ) ); // TREE_TXT
m_ImageList->Add( KiBitmap( icon_cvpcb_small_xpm ) ); // TREE_NET
m_ImageList->Add( KiBitmap( unknown_xpm ) ); // TREE_UNKNOWN
m_ImageList->Add( KiBitmap( directory_xpm ) ); // TREE_DIRECTORY
SetImageList( m_ImageList );
}
......
......@@ -72,23 +72,23 @@ void RIGHT_KM_FRAME::CreateCommandToolbar( void )
{
wxBitmapButton* btn;
btn = AddBitmapButton( ID_TO_EESCHEMA, wxBitmap( icon_eeschema_xpm ) );
btn = AddBitmapButton( ID_TO_EESCHEMA, KiBitmap( icon_eeschema_xpm ) );
btn->SetToolTip( _( "EESchema (Schematic editor)" ) );
btn = AddBitmapButton( ID_TO_CVPCB, wxBitmap( icon_cvpcb_xpm ) );
btn = AddBitmapButton( ID_TO_CVPCB, KiBitmap( icon_cvpcb_xpm ) );
btn->SetToolTip( _( "CVpcb (Components to modules)" ) );
btn = AddBitmapButton( ID_TO_PCB, wxBitmap( a_icon_pcbnew_xpm ) );
btn = AddBitmapButton( ID_TO_PCB, KiBitmap( a_icon_pcbnew_xpm ) );
btn->SetToolTip( _( "PCBnew (PCB editor)" ) );
btn = AddBitmapButton( ID_TO_GERBVIEW, wxBitmap( icon_gerbview_xpm ) );
btn = AddBitmapButton( ID_TO_GERBVIEW, KiBitmap( icon_gerbview_xpm ) );
btn->SetToolTip( _( "GerbView (Gerber viewer)" ) );
btn = AddBitmapButton( ID_TO_BITMAP_CONVERTER, wxBitmap( bitmap2component_xpm ) );
btn = AddBitmapButton( ID_TO_BITMAP_CONVERTER, KiBitmap( bitmap2component_xpm ) );
btn->SetToolTip( _( "Bitmap2Component (a tool to build a logo from a bitmap)\n\
Creates a component (for Eeschema) or a footprint (for Pcbnew) that shows a B&W picture" ) );
btn = AddBitmapButton( ID_TO_PCB_CALCULATOR, wxBitmap( pcb_calculator_xpm ) );
btn = AddBitmapButton( ID_TO_PCB_CALCULATOR, KiBitmap( pcb_calculator_xpm ) );
btn->SetToolTip( _( "Pcb calculator" ) );
}
......
......@@ -275,17 +275,17 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
// New
m_HToolBar->AddTool( ID_NEW_PROJECT, wxEmptyString,
wxBitmap( new_project_xpm ),
KiBitmap( new_project_xpm ),
_( "Start a new project" ) );
// Load
m_HToolBar->AddTool( ID_LOAD_PROJECT, wxEmptyString,
wxBitmap( open_project_xpm ),
KiBitmap( open_project_xpm ),
_( "Load existing project" ) );
// Save
m_HToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString,
wxBitmap( save_project_xpm ),
KiBitmap( save_project_xpm ),
_( "Save current project" ) );
// Separator
......@@ -293,7 +293,7 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
// Archive
m_HToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
wxBitmap( zip_xpm ),
KiBitmap( zip_xpm ),
_( "Archive all project files" ) );
// Separator
......@@ -301,7 +301,7 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
// Refresh project tree
m_HToolBar->AddTool( ID_PROJECT_TREE_REFRESH, wxEmptyString,
wxBitmap( reload_xpm ),
KiBitmap( reload_xpm ),
_( "Refresh project tree" ) );
// Create m_HToolBar
......
This diff is collapsed.
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