本文整理汇总了C++中KiBitmap函数的典型用法代码示例。如果您正苦于以下问题:C++ KiBitmap函数的具体用法?C++ KiBitmap怎么用?C++ KiBitmap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了KiBitmap函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetScreen
void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunction )
{
wxString msg;
SCH_SCREEN* screen = GetScreen();
msg = AddHotkeyName( _( "Delete Junction" ), s_Schematic_Hokeys_Descr, HK_DELETE );
AddMenuItem( aMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
if( !aJunction->IsNew() )
{
if( m_collectedItems.IsDraggableJunction() )
AddMenuItem( aMenu, ID_SCH_DRAG_ITEM, _( "Drag Junction" ), KiBitmap( move_xpm ) );
if( screen->GetWire( aJunction->GetPosition(), EXCLUDE_END_POINTS_T ) )
AddMenuItem( aMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ),
KiBitmap( break_line_xpm ) );
}
if( screen->GetWireOrBus( aJunction->GetPosition() ) )
{
AddMenuItem( aMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ),
KiBitmap( delete_node_xpm ) );
AddMenuItem( aMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ),
KiBitmap( delete_connection_xpm ) );
}
}
示例2: prepareImportExportMenu
void prepareImportExportMenu( wxMenu* aParentMenu )
{
AddMenuItem( aParentMenu,
ID_CONFIG_SAVE,
_( "&Save Preferences" ),
_( "Save application preferences" ),
KiBitmap( save_setup_xpm ) );
AddMenuItem( aParentMenu,
ID_CONFIG_READ,
_( "Load Prefe&rences" ),
_( "Load application preferences" ),
KiBitmap( import_setup_xpm ) );
aParentMenu->AppendSeparator();
AddMenuItem( aParentMenu,
ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
_( "E&xport Hotkeys" ),
_( "Create hotkey configuration file with current hotkeys" ),
KiBitmap( hotkeys_export_xpm ) );
AddMenuItem( aParentMenu,
ID_PREFERENCES_HOTKEY_IMPORT_CONFIG,
_( "&Import Hotkeys" ),
_( "Load existing hotkey configuration file" ),
KiBitmap( hotkeys_import_xpm ) );
}
示例3: AddMenusForLabel
void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
{
wxMenu* menu_change_type = new wxMenu;
wxString msg;
if( !Label->GetFlags() )
{
msg = AddHotkeyName( _( "Move Label" ), g_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_text_xpm ) );
msg = AddHotkeyName( _( "Drag Label" ), g_Schematic_Hokeys_Descr, HK_DRAG );
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( move_text_xpm ) );
msg = AddHotkeyName( _( "Copy Label" ), g_Schematic_Hokeys_Descr,
HK_COPY_COMPONENT_OR_LABEL );
AddMenuItem( PopMenu, ID_POPUP_SCH_COPY_ITEM, msg, KiBitmap( copy_button_xpm ) );
}
msg = AddHotkeyName( _( "Rotate Label" ), g_Schematic_Hokeys_Descr, HK_ROTATE );
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
msg = AddHotkeyName( _( "Edit Label" ), g_Schematic_Hokeys_Descr, HK_EDIT );
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
msg = AddHotkeyName( _( "Delete Label" ), g_Schematic_Hokeys_Descr, HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_text_xpm ) );
// add menu change type text (to label, glabel, text):
AddMenuItem( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL,
_( "Change to Hierarchical Label" ), KiBitmap( label2glabel_xpm ) );
AddMenuItem( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_COMMENT,
_( "Change to Text" ), KiBitmap( label2text_xpm ) );
AddMenuItem( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_GLABEL,
_( "Change to Global Label" ), KiBitmap( label2glabel_xpm ) );
AddMenuItem( PopMenu, menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT,
_( "Change Type" ), KiBitmap( gl_change_xpm ) );
}
示例4: prepareHelpMenu
void prepareHelpMenu( wxMenu* aParentMenu )
{
AddMenuItem( aParentMenu,
wxID_HELP,
_( "Eeschema &Manual" ),
_( "Open Eeschema Manual" ),
KiBitmap( online_help_xpm ) );
AddMenuItem( aParentMenu,
wxID_INDEX,
_( "&Getting Started in KiCad" ),
_( "Open \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) );
AddMenuItem( aParentMenu,
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
_( "&List Hotkeys" ),
_( "Displays current hotkeys list and corresponding commands" ),
KiBitmap( hotkeys_xpm ) );
aParentMenu->AppendSeparator();
AddMenuItem( aParentMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (open web browser)" ),
KiBitmap( info_xpm ) );
aParentMenu->AppendSeparator();
AddMenuItem( aParentMenu,
wxID_ABOUT,
_( "&About KiCad" ),
_( "About KiCad" ),
KiBitmap( about_xpm ) );
}
示例5: Kiface
void DIALOG_ANNOTATE::InitValues()
{
m_Config = Kiface().KifaceSettings();
if( m_Config )
{
long option;
m_Config->Read( KEY_ANNOTATE_SORT_OPTION, &option, 0L );
switch( option )
{
default:
case 0:
m_rbSortBy_X_Position->SetValue( 1 );
break;
case 1:
m_rbSortBy_Y_Position->SetValue( 1 );
break;
case 2:
m_rbUseIncremental->SetValue( 1 );
break;
}
m_Config->Read( KEY_ANNOTATE_ALGO_OPTION, &option, 0L );
switch( option )
{
default:
case 0:
m_rbUseIncremental->SetValue( 1 );
break;
case 1:
m_rbUseSheetNum->SetValue( 1 );
break;
case 2:
m_rbStartSheetNumLarge->SetValue( 1 );
break;
}
m_Config->Read( KEY_ANNOTATE_KEEP_OPEN_OPTION, &option, 0L );
m_cbKeepDlgOpen->SetValue( option );
m_Config->Read( KEY_ANNOTATE_ASK_FOR_CONFIRMATION, &option, 1L );
m_cbAskForConfirmation->SetValue( option );
}
annotate_down_right_bitmap->SetBitmap( KiBitmap( annotate_down_right_xpm ) );
annotate_right_down_bitmap->SetBitmap( KiBitmap( annotate_right_down_xpm ) );
m_btnApply->SetDefault();
}
示例6: AddMenusForBlock
void AddMenusForBlock( wxMenu* PopMenu, LIB_EDIT_FRAME* frame )
{
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_CANCEL_EDITING, _( "Cancel Block" ),
KiBitmap( cancel_xpm ) );
if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE )
AddMenuItem( PopMenu, ID_POPUP_ZOOM_BLOCK,
_( "Zoom Block (drag middle mouse)" ),
KiBitmap( zoom_area_xpm ) );
PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE )
{
AddMenuItem( PopMenu, ID_POPUP_SELECT_ITEMS_BLOCK, _( "Select Items" ),
KiBitmap( green_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), KiBitmap( copyblock_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_MIRROR_Y_BLOCK, _( "Mirror Block ||" ),
KiBitmap( mirror_h_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_MIRROR_X_BLOCK, _( "Mirror Block --" ),
KiBitmap( mirror_v_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_ROTATE_BLOCK, _( "Rotate Block ccw" ),
KiBitmap( rotate_ccw_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK, _( "Delete Block" ), KiBitmap( delete_xpm ) );
}
}
示例7: DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE
DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( wxWindow* aParent,
PNS::MEANDER_SETTINGS& aSettings, PNS::ROUTER_MODE aMode )
:
DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( aParent ),
m_minAmpl( this, m_minAmplText, m_minAmplUnit ),
m_maxAmpl( this, m_maxAmplText, m_maxAmplUnit ),
m_spacing( this, m_spacingText, m_spacingUnit ),
m_targetLength( this, m_targetLengthText, m_targetLengthUnit ),
m_settings( aSettings ),
m_mode( aMode )
{
m_miterStyle->Enable( true );
m_radiusText->Enable( aMode != PNS::PNS_MODE_TUNE_DIFF_PAIR );
//m_minAmpl.Enable ( aMode != PNS_MODE_TUNE_DIFF_PAIR_SKEW );
m_minAmpl.SetValue( m_settings.m_minAmplitude );
m_maxAmpl.SetValue( m_settings.m_maxAmplitude );
m_spacing.SetValue( m_settings.m_spacing );
m_radiusText->SetValue( wxString::Format( wxT( "%i" ), m_settings.m_cornerRadiusPercentage ) );
m_miterStyle->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 );
switch( aMode )
{
case PNS::PNS_MODE_TUNE_SINGLE:
SetTitle( _( "Single Track Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_single_track_length_legend_xpm ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR:
SetTitle( _( "Differential Pair Length Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_diff_pair_length_legend_xpm ) );
m_targetLength.SetValue( m_settings.m_targetLength );
break;
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW:
SetTitle( _( "Differential Pair Skew Tuning" ) );
m_legend->SetBitmap( KiBitmap( tune_diff_pair_skew_legend_xpm ) );
m_targetLengthLabel->SetLabel( _( "Target skew: " ) );
m_targetLength.SetValue ( m_settings.m_targetSkew );
break;
default:
break;
}
m_stdButtonsOK->SetDefault();
m_targetLengthText->SetSelection( -1, -1 );
m_targetLengthText->SetFocus();
GetSizer()->SetSizeHints(this);
Centre();
}
示例8: AddMenusForComponentField
void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
{
wxString msg, name;
if( !Field->GetFlags() )
{
switch( Field->GetId() )
{
case REFERENCE: name = _( "Move Reference" ); break;
case VALUE: name = _( "Move Value" ); break;
case FOOTPRINT: name = _( "Move Footprint Field" ); break;
default: name = _( "Move Field" ); break;
}
msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr,
HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_text_xpm ) );
}
switch( Field->GetId() )
{
case REFERENCE: name = _( "Rotate Reference" ); break;
case VALUE: name = _( "Rotate Value" ); break;
case FOOTPRINT: name = _( "Rotate Footprint Field" ); break;
default: name = _( "Rotate Field" ); break;
}
msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr, HK_ROTATE );
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_field_xpm ) );
// Ref, value and footprint have specific hotkeys. Show the specific hotkey:
hotkey_id_commnand id;
switch( Field->GetId() )
{
case REFERENCE:
id = HK_EDIT_COMPONENT_REFERENCE;
name = _( "Edit Reference" );
break;
case VALUE:
id = HK_EDIT_COMPONENT_VALUE;
name = _( "Edit Value" );
break;
case FOOTPRINT:
id = HK_EDIT_COMPONENT_FOOTPRINT;
name = _( "Edit Footprint Field" );
break;
default:
id = HK_EDIT;
name = _( "Edit Field" );
break;
}
msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr, id );
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
}
示例9: BOARD
void PANEL_PREV_3D::initPanel()
{
m_dummyBoard = new BOARD();
m_selected = -1;
// Set the bitmap of 3D view buttons:
m_bpvTop->SetBitmap( KiBitmap( axis3d_top_xpm ) );
m_bpvFront->SetBitmap( KiBitmap( axis3d_front_xpm ) );
m_bpvBack->SetBitmap( KiBitmap( axis3d_back_xpm ) );
m_bpvLeft->SetBitmap( KiBitmap( axis3d_left_xpm ) );
m_bpvRight->SetBitmap( KiBitmap( axis3d_right_xpm ) );
m_bpvBottom->SetBitmap( KiBitmap( axis3d_bottom_xpm ) );
m_bpvISO->SetBitmap( KiBitmap( ortho_xpm ) );
m_bpUpdate->SetBitmap( KiBitmap( reload_xpm ) );
// Set the min and max values of spin buttons (mandatory on Linux)
// They are not used, so they are set to min and max 32 bits int values
// (the min and max values supported by a wxSpinButton)
// It avoids blocking the up or down arrows when reaching this limit after
// a few clicks.
wxSpinButton* spinButtonList[] =
{
m_spinXscale, m_spinYscale, m_spinZscale,
m_spinXrot, m_spinYrot, m_spinZrot,
m_spinXoffset,m_spinYoffset, m_spinZoffset
};
for( int ii = 0; ii < 9; ii++ )
spinButtonList[ii]->SetRange( INT_MIN, INT_MAX );
}
示例10: AddBitmapButton
/**
* Function CreateCommandToolbar
* create the buttons to call Eeschema CvPcb, Pcbnew and GerbView
*/
void LAUNCHER_PANEL::CreateCommandToolbar()
{
wxBitmapButton* btn;
btn = AddBitmapButton( ID_TO_SCH, KiBitmap( icon_eeschema_xpm ) );
btn->SetToolTip( _( "Eeschema - Electronic schematic editor" ) );
btn = AddBitmapButton( ID_TO_SCH_LIB_EDITOR, KiBitmap( libedit_icon_xpm ) );
btn->SetToolTip( _( "Schematic library editor" ) );
btn = AddBitmapButton( ID_TO_PCB, KiBitmap( icon_pcbnew_xpm ) );
btn->SetToolTip( _( "Pcbnew - Printed circuit board editor" ) );
btn = AddBitmapButton( ID_TO_PCB_FP_EDITOR, KiBitmap( icon_modedit_xpm ) );
btn->SetToolTip( _( "PCB footprint editor" ) );
btn = AddBitmapButton( ID_TO_GERBVIEW, KiBitmap( icon_gerbview_xpm ) );
btn->SetToolTip( _( "GerbView - Gerber viewer" ) );
btn = AddBitmapButton( ID_TO_BITMAP_CONVERTER, KiBitmap( icon_bitmap2component_xpm ) );
btn->SetToolTip( _(
"Bitmap2Component - Convert bitmap images to Eeschema\n"
"or Pcbnew elements" ) );
btn = AddBitmapButton( ID_TO_PCB_CALCULATOR, KiBitmap( icon_pcbcalculator_xpm ) );
btn->SetToolTip( _( "Pcb calculator - Calculator for components, track width, etc." ) );
btn = AddBitmapButton( ID_TO_PL_EDITOR, KiBitmap( icon_pagelayout_editor_xpm ) );
btn->SetToolTip( _( "Pl editor - Worksheet layout editor" ) );
}
示例11: GetBoard
/* Create pop menu for pads
* also update Netclass selection
*/
void PCB_EDIT_FRAME::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu )
{
wxMenu* sub_menu_Pad;
int flags = Pad->GetFlags();
if( flags ) // Currently in edit, no others commands possible
return;
if( GetBoard()->GetCurrentNetClassName() != Pad->GetNetClassName() )
{
GetBoard()->SetCurrentNetClass( Pad->GetNetClassName() );
updateTraceWidthSelectBox();
updateViaSizeSelectBox();
}
wxString msg = Pad->GetSelectMenuText();
sub_menu_Pad = new wxMenu;
AddMenuItem( menu, sub_menu_Pad, -1, msg, KiBitmap( pad_xpm ) );
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_MOVE_PAD_REQUEST, _( "Move" ),
KiBitmap( move_pad_xpm ) );
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_DRAG_PAD_REQUEST, _( "Drag" ),
KiBitmap( drag_pad_xpm ) );
msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_EDIT_PAD, msg, KiBitmap( options_pad_xpm ) );
sub_menu_Pad->AppendSeparator();
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_IMPORT_PAD_SETTINGS,
_( "Copy Current Settings to this Pad" ),
wxEmptyString,
KiBitmap( options_new_pad_xpm ) );
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_EXPORT_PAD_SETTINGS,
_( "Copy this Pad Settings to Current Settings" ),
wxEmptyString,
KiBitmap( export_options_pad_xpm ) );
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_GLOBAL_IMPORT_PAD_SETTINGS,
_( "Edit All Pads" ),
_( "Copy this pad's settings to all pads in this footprint (or similar footprints)" ),
KiBitmap( global_options_pad_xpm ) );
sub_menu_Pad->AppendSeparator();
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_DELETE_PAD, _( "Delete" ), KiBitmap( delete_pad_xpm ) );
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
{
menu->Append( ID_POPUP_PCB_AUTOROUTE_PAD, _( "Automatically Route Pad" ) );
menu->Append( ID_POPUP_PCB_AUTOROUTE_NET, _( "Automatically Route Net" ) );
}
MODULE* module = (MODULE*) Pad->GetParent();
if( module )
{
menu->AppendSeparator();
createPopUpMenuForFootprints( module, menu );
}
}
示例12: AddMenusForWire
void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
{
SCH_SCREEN* screen = frame->GetScreen();
wxPoint pos = frame->GetCrossHairPosition();
wxString msg;
if( Wire == NULL )
{
msg = AddHotkeyName( _( "Begin Wire" ), g_Schematic_Hokeys_Descr, HK_BEGIN_WIRE );
AddMenuItem( PopMenu, ID_POPUP_SCH_BEGIN_WIRE, msg, KiBitmap( add_line_xpm ) );
return;
}
bool is_new = Wire->IsNew();
if( is_new )
{
msg = AddHotkeyName( _( "Wire End" ), g_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS );
AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) );
return;
}
msg = AddHotkeyName( _( "Drag Wire" ), g_Schematic_Hokeys_Descr, HK_DRAG );
AddMenuItem( PopMenu, ID_SCH_DRAG_ITEM, msg, KiBitmap( move_track_xpm ) );
PopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Delete Wire" ), g_Schematic_Hokeys_Descr, HK_DELETE );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, msg, KiBitmap( delete_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ),
KiBitmap( delete_node_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ),
KiBitmap( delete_connection_xpm ) );
SCH_LINE* line = screen->GetWireOrBus( frame->GetCrossHairPosition() );
if( line && !line->IsEndPoint( frame->GetCrossHairPosition() ) )
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ),
KiBitmap( break_line_xpm ) );
PopMenu->AppendSeparator();
msg = AddHotkeyName( _( "Add Junction" ), g_Schematic_Hokeys_Descr, HK_ADD_JUNCTION );
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_JUNCTION, msg, KiBitmap( add_junction_xpm ) );
msg = AddHotkeyName( _( "Add Label" ), g_Schematic_Hokeys_Descr, HK_ADD_LABEL );
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_LABEL, msg, KiBitmap( add_line_label_xpm ) );
// Add global label command only if the cursor is over one end of the wire.
if( Wire->IsEndPoint( pos ) )
AddMenuItem( PopMenu, ID_POPUP_SCH_ADD_GLABEL, _( "Add Global Label" ),
KiBitmap( add_glabel_xpm ) );
}
示例13: AddNewItemsCommand
// Helper function to add menuitems relative to items creation
void AddNewItemsCommand( wxMenu* aMainMenu )
{
AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_LINE, _( "Add Line" ),
KiBitmap( add_dashed_line_xpm ) );
AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_RECT, _( "Add Rectangle" ),
KiBitmap( add_rectangle_xpm ) );
AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_TEXT, _( "Add Text" ),
KiBitmap( add_text_xpm ) );
AddMenuItem( aMainMenu, ID_POPUP_ITEM_APPEND_PAGE_LAYOUT,
_( "Append Page Layout Descr File" ),
KiBitmap( import_xpm ) );
AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_BITMAP,
_( "Add Bitmap" ),
KiBitmap( image_xpm ) );
}
示例14: _
void EDA_3D_FRAME::ReCreateMenuBar()
{
bool full_options = true;
// If called from the display frame of CvPcb, only some options are relevant
if( Parent()->GetName() == wxT( "CmpFrame" ) )
// Called from CvPcb: do not display all options
full_options = false;
wxMenuBar* menuBar = new wxMenuBar;
wxMenu* fileMenu = new wxMenu;
menuBar->Append( fileMenu, _( "&File" ) );
fileMenu->Append( ID_MENU_SCREENCOPY_PNG, _( "Create Image (png format)" ) );
fileMenu->Append( ID_MENU_SCREENCOPY_JPEG, _( "Create Image (jpeg format)" ) );
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
// Does not work properly under linux
fileMenu->AppendSeparator();
fileMenu->Append( ID_TOOL_SCREENCOPY_TOCLIBBOARD, _( "Copy 3D Image to Clipboard" ) );
#endif
fileMenu->AppendSeparator();
fileMenu->Append( wxID_EXIT, _( "&Exit" ) );
wxMenu* referencesMenu = new wxMenu;
menuBar->Append( referencesMenu, _( "&Preferences" ) );
AddMenuItem( referencesMenu, ID_MENU3D_BGCOLOR_SELECTION,
_( "Choose background color" ), KiBitmap( palette_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_AXIS_ONOFF,
_( "3D Axis On/Off" ), KiBitmap( axis3d_front_xpm ) );
if( full_options )
{
AddMenuItem( referencesMenu, ID_MENU3D_MODULE_ONOFF,
_( "3D Footprints Shapes On/Off" ), KiBitmap( shape_3d_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_ZONE_ONOFF,
_( "Zone Filling On/Off" ), KiBitmap( add_zone_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Comments Layer On/Off" ), KiBitmap( edit_sheet_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_DRAWINGS_ONOFF,
_( "Drawings Layer On/Off" ), KiBitmap( add_polygon_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_ECO1_ONOFF,
_( "Eco1 Layer On/Off" ), KiBitmap( tools_xpm ) );
AddMenuItem( referencesMenu, ID_MENU3D_ECO2_ONOFF,
_( "Eco2 Layer On/Off" ), KiBitmap( tools_xpm ) );
}
SetMenuBar( menuBar );
}
示例15: wxBitmapComboBox
PinTypeComboBox::PinTypeComboBox( wxWindow* parent,
wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
int n,
const wxString choices[],
long style,
const wxValidator& validator,
const wxString& name ) :
wxBitmapComboBox( parent, id, value, pos, size, n, choices, style, validator, name )
{
for( unsigned ii = 0; ii < PINTYPE_COUNT; ++ii )
{
ELECTRICAL_PINTYPE type = static_cast<ELECTRICAL_PINTYPE>( ii );
wxString text = GetText( type );
BITMAP_DEF bitmap = GetBitmap( type );
if( bitmap == NULL )
Append( text );
else
Insert( text, KiBitmap( bitmap ), ii );
}
}