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
c328d6b1
Commit
c328d6b1
authored
Jul 21, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pl_editor: add config options
parent
1f3f11ca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
10 deletions
+31
-10
events_functions.cpp
pagelayout_editor/events_functions.cpp
+2
-0
menubar.cpp
pagelayout_editor/menubar.cpp
+8
-9
pl_editor_config.cpp
pagelayout_editor/pl_editor_config.cpp
+19
-1
pl_editor_id.h
pagelayout_editor/pl_editor_id.h
+2
-0
No files found.
pagelayout_editor/events_functions.cpp
View file @
c328d6b1
...
@@ -53,6 +53,8 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
...
@@ -53,6 +53,8 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
EVT_MENU
(
ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR
,
EVT_MENU
(
ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR
,
EDA_BASE_FRAME
::
OnSelectPreferredEditor
)
EDA_BASE_FRAME
::
OnSelectPreferredEditor
)
EVT_MENU
(
wxID_PREFERENCES
,
PL_EDITOR_FRAME
::
Process_Config
)
EVT_MENU
(
wxID_PREFERENCES
,
PL_EDITOR_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_SWITCH_BGCOLOR
,
PL_EDITOR_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_GRID_ONOFF
,
PL_EDITOR_FRAME
::
Process_Config
)
// Menu Help
// Menu Help
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
EVT_MENU
(
wxID_HELP
,
EDA_DRAW_FRAME
::
GetKicadHelp
)
...
...
pagelayout_editor/menubar.cpp
View file @
c328d6b1
...
@@ -112,17 +112,16 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void )
...
@@ -112,17 +112,16 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void )
// Menu for preferences
// Menu for preferences
wxMenu
*
preferencesMenu
=
new
wxMenu
;
wxMenu
*
preferencesMenu
=
new
wxMenu
;
// Options (Preferences on WXMAC)
#ifdef __WXMAC__
preferencesMenu
->
Append
(
wxID_PREFERENCES
);
#else
AddMenuItem
(
preferencesMenu
,
AddMenuItem
(
preferencesMenu
,
wxID_PREFERENCES
,
ID_MENU_SWITCH_BGCOLOR
,
_
(
"&Options"
),
g_DrawBgColor
==
WHITE
?
wxEmptyString
,
_
(
"&BackGround Black"
)
:
_
(
"&BackGround White"
),
KiBitmap
(
preference_xpm
)
);
wxEmptyString
,
KiBitmap
(
palette_xpm
)
);
#endif // __WXMAC__
AddMenuItem
(
preferencesMenu
,
ID_MENU_GRID_ONOFF
,
IsGridVisible
()
?
_
(
"Hide &Grid"
)
:
_
(
"Show &Grid"
),
wxEmptyString
,
KiBitmap
(
grid_xpm
)
);
// Text editor selection
// Text editor selection
AddMenuItem
(
preferencesMenu
,
AddMenuItem
(
preferencesMenu
,
...
...
pagelayout_editor/pl_editor_config.cpp
View file @
c328d6b1
...
@@ -50,7 +50,25 @@ void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event )
...
@@ -50,7 +50,25 @@ void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event )
switch
(
id
)
switch
(
id
)
{
{
case
wxID_PREFERENCES
:
case
ID_MENU_SWITCH_BGCOLOR
:
if
(
g_DrawBgColor
==
WHITE
)
g_DrawBgColor
=
BLACK
;
else
g_DrawBgColor
=
WHITE
;
GetMenuBar
()
->
SetLabel
(
ID_MENU_SWITCH_BGCOLOR
,
g_DrawBgColor
==
WHITE
?
_
(
"&BackGround Black"
)
:
_
(
"&BackGround White"
)
);
m_canvas
->
Refresh
();
break
;
case
ID_MENU_GRID_ONOFF
:
SetGridVisibility
(
!
IsGridVisible
()
);
GetMenuBar
()
->
SetLabel
(
ID_MENU_GRID_ONOFF
,
IsGridVisible
()
?
_
(
"Hide &Grid"
)
:
_
(
"Show &Grid"
)
);
m_canvas
->
Refresh
();
break
;
break
;
// Standard basic hotkey IDs
// Standard basic hotkey IDs
...
...
pagelayout_editor/pl_editor_id.h
View file @
c328d6b1
...
@@ -17,6 +17,8 @@ enum pl_editor_ids
...
@@ -17,6 +17,8 @@ enum pl_editor_ids
ID_PL_EDITOR_SHOW_SOURCE
,
ID_PL_EDITOR_SHOW_SOURCE
,
ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR
,
ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR
,
ID_MENU_SWITCH_BGCOLOR
,
ID_MENU_GRID_ONOFF
,
ID_DESIGN_TREE_FRAME
,
ID_DESIGN_TREE_FRAME
,
ID_SHOW_REAL_MODE
,
ID_SHOW_REAL_MODE
,
...
...
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