Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
56f52955
Commit
56f52955
authored
Aug 29, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more KiBitmap() stuff
parent
3c208f5e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
61 deletions
+68
-61
3d_toolbar.cpp
3d-viewer/3d_toolbar.cpp
+8
-8
PNG2cpp.cmake
CMakeModules/PNG2cpp.cmake
+2
-1
basicframe.cpp
common/basicframe.cpp
+1
-1
dialog_about.cpp
common/dialog_about/dialog_about.cpp
+5
-3
edaappl.cpp
common/edaappl.cpp
+33
-30
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+6
-5
zoom.cpp
common/zoom.cpp
+8
-8
bitmaps.h
include/bitmaps.h
+4
-4
macros.h
include/macros.h
+1
-1
No files found.
3d-viewer/3d_toolbar.cpp
View file @
56f52955
...
...
@@ -137,30 +137,30 @@ void EDA_3D_FRAME::ReCreateMenuBar()
menuBar
->
Append
(
referencesMenu
,
_
(
"&Preferences"
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_BGCOLOR_SELECTION
,
_
(
"Choose background color"
),
palette_xpm
);
_
(
"Choose background color"
),
KiBitmap
(
palette_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_AXIS_ONOFF
,
_
(
"3D Axis On/Off"
),
axis3d_front_xpm
);
_
(
"3D Axis On/Off"
),
KiBitmap
(
axis3d_front_xpm
)
);
if
(
full_options
)
{
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_MODULE_ONOFF
,
_
(
"3D Footprints Shapes On/Off"
),
shape_3d_xpm
);
_
(
"3D Footprints Shapes On/Off"
),
KiBitmap
(
shape_3d_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_ZONE_ONOFF
,
_
(
"Zone Filling On/Off"
),
add_zone_xpm
);
_
(
"Zone Filling On/Off"
),
KiBitmap
(
add_zone_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_COMMENTS_ONOFF
,
_
(
"Comments Layer On/Off"
),
edit_sheet_xpm
);
_
(
"Comments Layer On/Off"
),
KiBitmap
(
edit_sheet_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_DRAWINGS_ONOFF
,
_
(
"Drawings Layer On/Off"
),
add_polygon_xpm
);
_
(
"Drawings Layer On/Off"
),
KiBitmap
(
add_polygon_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_ECO1_ONOFF
,
_
(
"Eco1 Layer On/Off"
),
tools_xpm
);
_
(
"Eco1 Layer On/Off"
),
KiBitmap
(
tools_xpm
)
);
ADD_MENUITEM
(
referencesMenu
,
ID_MENU3D_ECO2_ONOFF
,
_
(
"Eco2 Layer On/Off"
),
tools_xpm
);
_
(
"Eco2 Layer On/Off"
),
KiBitmap
(
tools_xpm
)
);
}
SetMenuBar
(
menuBar
);
...
...
CMakeModules/PNG2cpp.cmake
View file @
56f52955
...
...
@@ -54,7 +54,8 @@ static const unsigned char png[] = {"
set
(
output_end
"};
BITMAP_DEF
${
png_name
}
= { png, sizeof(png) };
// make as array so its name is a pointer.
BITMAP_OPAQUE
${
png_name
}
[1] = { png, sizeof(png) };
//EOF
"
)
...
...
common/basicframe.cpp
View file @
56f52955
...
...
@@ -367,7 +367,7 @@ void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
ADD_MENUITEM_WITH_HELP
(
aMenu
,
ID_HELP_COPY_VERSION_STRING
,
_
(
"Copy &Version Information"
),
_
(
"Copy the version string to clipboard to send with bug reports"
),
copy_button_xpm
);
KiBitmap
(
copy_button_xpm
)
);
}
...
...
common/dialog_about/dialog_about.cpp
View file @
56f52955
...
...
@@ -308,12 +308,14 @@ wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const w
wxStaticBitmap
*
dialog_about
::
CreateStaticBitmap
(
wxScrolledWindow
*
parent
,
wxBitmap
*
icon
)
{
wxStaticBitmap
*
bitmap
=
new
wxStaticBitmap
(
parent
,
wxID_ANY
,
wxNullBitmap
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
if
(
icon
)
if
(
icon
)
{
bitmap
->
SetBitmap
(
*
icon
);
}
else
{
bitmap
->
SetBitmap
(
right_xpm
);
else
{
bitmap
->
SetBitmap
(
KiBitmap
(
right_xpm
)
);
}
return
bitmap
;
}
...
...
common/edaappl.cpp
View file @
56f52955
...
...
@@ -62,19 +62,19 @@ static wxString languageCfgKey( wxT( "LanguageID" ) );
*/
struct
LANGUAGE_DESCR
{
/
* wxWidgets locale identifier (See wxWidgets doc) */
/
// wxWidgets locale identifier (See wxWidgets doc)
int
m_WX_Lang_Identifier
;
/
* KiCad identifier used in menu selection (See id.h) */
/
// KiCad identifier used in menu selection (See id.h)
int
m_KI_Lang_Identifier
;
/
* The menu language icons */
const
wxBitmap
m_Lang_Icon
;
/
// The menu language icons
BITMAP_DEF
m_Lang_Icon
;
/
* Labels used in menus */
/
// Labels used in menus
const
wxChar
*
m_Lang_Label
;
/
* Set to true if the m_Lang_Label must not be translated */
/
// Set to true if the m_Lang_Label must not be translated
bool
m_DoNotTranslate
;
};
...
...
@@ -91,7 +91,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_DEFAULT
,
ID_LANGUAGE_DEFAULT
,
KiBitmap
(
lang_def_xpm
)
,
lang_def_xpm
,
_
(
"Default"
)
},
...
...
@@ -99,7 +99,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_ENGLISH
,
ID_LANGUAGE_ENGLISH
,
KiBitmap
(
lang_en_xpm
)
,
lang_en_xpm
,
wxT
(
"English"
),
true
},
...
...
@@ -108,7 +108,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_FRENCH
,
ID_LANGUAGE_FRENCH
,
KiBitmap
(
lang_fr_xpm
)
,
lang_fr_xpm
,
_
(
"French"
)
},
...
...
@@ -116,7 +116,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_FINNISH
,
ID_LANGUAGE_FINNISH
,
KiBitmap
(
lang_fi_xpm
)
,
lang_fi_xpm
,
_
(
"Finnish"
)
},
...
...
@@ -124,7 +124,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_SPANISH
,
ID_LANGUAGE_SPANISH
,
KiBitmap
(
lang_es_xpm
)
,
lang_es_xpm
,
_
(
"Spanish"
)
},
...
...
@@ -132,7 +132,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_PORTUGUESE
,
ID_LANGUAGE_PORTUGUESE
,
KiBitmap
(
lang_pt_xpm
)
,
lang_pt_xpm
,
_
(
"Portuguese"
)
},
...
...
@@ -140,7 +140,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_ITALIAN
,
ID_LANGUAGE_ITALIAN
,
KiBitmap
(
lang_it_xpm
)
,
lang_it_xpm
,
_
(
"Italian"
)
},
...
...
@@ -148,7 +148,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_GERMAN
,
ID_LANGUAGE_GERMAN
,
KiBitmap
(
lang_de_xpm
)
,
lang_de_xpm
,
_
(
"German"
)
},
...
...
@@ -156,7 +156,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_GREEK
,
ID_LANGUAGE_GREEK
,
KiBitmap
(
lang_gr_xpm
)
,
lang_gr_xpm
,
_
(
"Greek"
)
},
...
...
@@ -164,7 +164,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_SLOVENIAN
,
ID_LANGUAGE_SLOVENIAN
,
KiBitmap
(
lang_sl_xpm
)
,
lang_sl_xpm
,
_
(
"Slovenian"
)
},
...
...
@@ -172,7 +172,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_HUNGARIAN
,
ID_LANGUAGE_HUNGARIAN
,
KiBitmap
(
lang_hu_xpm
)
,
lang_hu_xpm
,
_
(
"Hungarian"
)
},
...
...
@@ -180,7 +180,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_POLISH
,
ID_LANGUAGE_POLISH
,
KiBitmap
(
lang_pl_xpm
)
,
lang_pl_xpm
,
_
(
"Polish"
)
},
...
...
@@ -188,7 +188,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_CZECH
,
ID_LANGUAGE_CZECH
,
KiBitmap
(
lang_cs_xpm
)
,
lang_cs_xpm
,
_
(
"Czech"
)
},
...
...
@@ -196,7 +196,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_RUSSIAN
,
ID_LANGUAGE_RUSSIAN
,
KiBitmap
(
lang_ru_xpm
)
,
lang_ru_xpm
,
_
(
"Russian"
)
},
...
...
@@ -204,7 +204,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_KOREAN
,
ID_LANGUAGE_KOREAN
,
KiBitmap
(
lang_ko_xpm
)
,
lang_ko_xpm
,
_
(
"Korean"
)
},
...
...
@@ -212,7 +212,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_CHINESE_SIMPLIFIED
,
ID_LANGUAGE_CHINESE_SIMPLIFIED
,
KiBitmap
(
lang_chinese_xpm
)
,
lang_chinese_xpm
,
_
(
"Chinese simplified"
)
},
...
...
@@ -220,7 +220,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_CATALAN
,
ID_LANGUAGE_CATALAN
,
KiBitmap
(
lang_catalan_xpm
)
,
lang_catalan_xpm
,
_
(
"Catalan"
)
},
...
...
@@ -228,7 +228,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_DUTCH
,
ID_LANGUAGE_DUTCH
,
KiBitmap
(
lang_nl_xpm
)
,
lang_nl_xpm
,
_
(
"Dutch"
)
},
...
...
@@ -236,7 +236,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{
wxLANGUAGE_JAPANESE
,
ID_LANGUAGE_JAPANESE
,
KiBitmap
(
lang_jp_xpm
)
,
lang_jp_xpm
,
_
(
"Japanese"
)
}
};
...
...
@@ -430,11 +430,14 @@ bool WinEDA_App::SetBinDir()
if
(
strchr
(
(
const
char
*
)
argv
[
0
],
'/'
)
==
NULL
)
// no path
{
sprintf
(
FileName
,
"which %s > %s"
,
TO_UTF8
(
str_arg0
),
TMP_FILE
);
system
(
FileName
);
int
ret
=
system
(
FileName
);
(
void
)
ret
;
if
(
(
ftmp
=
fopen
(
TMP_FILE
,
"rt"
)
)
!=
NULL
)
{
fgets
(
Line
,
1000
,
ftmp
);
const
char
*
line
=
fgets
(
Line
,
1000
,
ftmp
);
(
void
)
line
;
fclose
(
ftmp
);
remove
(
TMP_FILE
);
}
...
...
@@ -849,7 +852,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
ID_LANGUAGE_CHOICE
,
_
(
"Language"
),
_
(
"Select application language (only for testing!)"
),
language_xpm
);
KiBitmap
(
language_xpm
)
);
// Set Check mark on current selected language
for
(
ii
=
0
;
ii
<
LANGUAGE_DESCR_COUNT
;
ii
++
)
...
...
common/hotkeys_basic.cpp
View file @
56f52955
...
...
@@ -639,13 +639,13 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST
,
_
(
"List Current Keys"
),
_
(
"Displays the current hotkeys list and corresponding commands"
),
info_xpm
);
KiBitmap
(
info_xpm
)
);
/* Call hotkeys editor*/
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SHOW_EDITOR
,
_
(
"Edit Hotkeys"
),
_
(
"Call the hotkeys editor"
),
editor_xpm
);
KiBitmap
(
editor_xpm
)
);
HotkeySubmenu
->
AppendSeparator
();
...
...
@@ -653,17 +653,18 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_EXPORT_CONFIG
,
_
(
"Export Hotkeys Config"
),
_
(
"Create a hotkey configuration file to export the current hotkey config"
),
save_setup_xpm
);
KiBitmap
(
save_setup_xpm
)
);
/* Reload hotkey file */
ADD_MENUITEM_WITH_HELP
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_IMPORT_CONFIG
,
_
(
"Import Hotkeys Config"
),
_
(
"Load an existing hotkey configuration file"
),
reload_xpm
);
KiBitmap
(
reload_xpm
)
);
/* Append HotkeySubmenu to menu */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
aMenu
,
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SUBMENU
,
_
(
"Hotkeys"
),
_
(
"Hotkeys configuration and preferences"
),
hotkeys_xpm
);
_
(
"Hotkeys configuration and preferences"
),
KiBitmap
(
hotkeys_xpm
)
);
}
common/zoom.cpp
View file @
56f52955
...
...
@@ -154,21 +154,21 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
BASE_SCREEN
*
screen
=
DrawPanel
->
GetScreen
();
msg
=
AddHotkeyName
(
_
(
"Center"
),
m_HotkeysZoomAndGridList
,
HK_ZOOM_CENTER
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_CENTER
,
msg
,
zoom_center_on_screen_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_CENTER
,
msg
,
KiBitmap
(
zoom_center_on_screen_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Zoom in"
),
m_HotkeysZoomAndGridList
,
HK_ZOOM_IN
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_IN
,
msg
,
zoom_in_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_IN
,
msg
,
KiBitmap
(
zoom_in_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Zoom out"
),
m_HotkeysZoomAndGridList
,
HK_ZOOM_OUT
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_OUT
,
msg
,
zoom_out_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_ZOOM_OUT
,
msg
,
KiBitmap
(
zoom_out_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Redraw view"
),
m_HotkeysZoomAndGridList
,
HK_ZOOM_REDRAW
);
ADD_MENUITEM
(
MasterMenu
,
ID_ZOOM_REDRAW
,
msg
,
zoom_redraw_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_ZOOM_REDRAW
,
msg
,
KiBitmap
(
zoom_redraw_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Zoom auto"
),
m_HotkeysZoomAndGridList
,
HK_ZOOM_AUTO
);
ADD_MENUITEM
(
MasterMenu
,
ID_ZOOM_PAGE
,
msg
,
zoom_fit_in_page_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_ZOOM_PAGE
,
msg
,
KiBitmap
(
zoom_fit_in_page_xpm
)
);
wxMenu
*
zoom_choice
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
MasterMenu
,
zoom_choice
,
ID_POPUP_ZOOM_SELECT
,
_
(
"Zoom select"
),
zoom_selection_xpm
);
KiBitmap
(
zoom_selection_xpm
)
);
zoom
=
screen
->
GetZoom
();
maxZoomIds
=
ID_POPUP_ZOOM_LEVEL_END
-
ID_POPUP_ZOOM_LEVEL_START
;
...
...
@@ -191,7 +191,7 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
{
wxMenu
*
gridMenu
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
MasterMenu
,
gridMenu
,
ID_POPUP_GRID_SELECT
,
_
(
"Grid Select"
),
grid_select_xpm
);
_
(
"Grid Select"
),
KiBitmap
(
grid_select_xpm
)
);
GRID_TYPE
tmp
;
wxRealPoint
grid
=
screen
->
GetGridSize
();
...
...
@@ -234,5 +234,5 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
}
MasterMenu
->
AppendSeparator
();
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_CANCEL
,
_
(
"Close"
),
cancel_xpm
);
ADD_MENUITEM
(
MasterMenu
,
ID_POPUP_CANCEL
,
_
(
"Close"
),
KiBitmap
(
cancel_xpm
)
);
}
include/bitmaps.h
View file @
56f52955
...
...
@@ -17,8 +17,8 @@ struct BITMAP_OPAQUE
int
byteCount
;
};
#define EXTERN_BITMAP(x) extern const BITMAP_DEF x;
// declared as single unit array, so its name is a pointer.
#define EXTERN_BITMAP(x) extern const BITMAP_OPAQUE x[1];
#else
...
...
@@ -29,8 +29,8 @@ typedef const char* BITMAP_OPAQUE;
#endif
/// a BITMAP_DEF is really a const pointer to an opaque
structure. So you
/// should never need to use 'const' with it.
/// a BITMAP_DEF is really a const pointer to an opaque
/// s
tructure. So you s
hould never need to use 'const' with it.
typedef
const
BITMAP_OPAQUE
*
BITMAP_DEF
;
...
...
include/macros.h
View file @
56f52955
...
...
@@ -216,7 +216,7 @@ static inline void ADD_MENUITEM_WITH_HELP_AND_SUBMENU( wxMenu* menu,
// macro to add a bitmap list to check menus (do not use with normal menus)
#if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ )
# define SETBITMAPS( icon ) item->SetBitmaps( KiBitmap( apply_xpm ),
(icon
) )
# define SETBITMAPS( icon ) item->SetBitmaps( KiBitmap( apply_xpm ),
KiBitmap( icon
) )
#else
# define SETBITMAPS( icon )
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment