Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
e6867623
Commit
e6867623
authored
Jul 07, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added icons to window menu and to the tab bar
parent
7f037a96
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
13 deletions
+30
-13
src/gui/set/window.cpp
src/gui/set/window.cpp
+10
-9
src/gui/set/window.hpp
src/gui/set/window.hpp
+1
-1
src/gui/value/symbol.cpp
src/gui/value/symbol.cpp
+10
-3
src/gui/value/symbol.hpp
src/gui/value/symbol.hpp
+1
-0
src/resource/common/edit_symbol.png
src/resource/common/edit_symbol.png
+0
-0
src/resource/msw/mse.rc
src/resource/msw/mse.rc
+8
-0
src/resource/msw/tool/print_preview.png
src/resource/msw/tool/print_preview.png
+0
-0
src/resource/msw/tool/window_cards.png
src/resource/msw/tool/window_cards.png
+0
-0
src/resource/msw/tool/window_keywords.png
src/resource/msw/tool/window_keywords.png
+0
-0
src/resource/msw/tool/window_set_info.png
src/resource/msw/tool/window_set_info.png
+0
-0
src/resource/msw/tool/window_statistics.png
src/resource/msw/tool/window_statistics.png
+0
-0
src/resource/msw/tool/window_style.png
src/resource/msw/tool/window_style.png
+0
-0
No files found.
src/gui/set/window.cpp
View file @
e6867623
...
...
@@ -129,17 +129,17 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
tb
->
Realize
();
// tab bar, sizer
wxToolBar
*
tabBar
=
new
wxToolBar
(
this
,
ID_TAB_BAR
,
wxDefaultPosition
,
wxDefaultSize
,
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
|
wxTB_HORZ_TEXT
|
wxTB_NOICONS
);
wxToolBar
*
tabBar
=
new
wxToolBar
(
this
,
ID_TAB_BAR
,
wxDefaultPosition
,
wxDefaultSize
,
wxTB_FLAT
|
wxNO_BORDER
|
wxTB_HORIZONTAL
|
wxTB_HORZ_TEXT
);
wxSizer
*
s
=
new
wxBoxSizer
(
wxVERTICAL
);
s
->
Add
(
tabBar
,
0
,
wxEXPAND
|
wxBOTTOM
,
3
);
SetSizer
(
s
);
// panels
addPanel
(
menuWindow
,
tabBar
,
new
CardsPanel
(
this
,
wxID_ANY
),
0
,
_
(
"cards tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
SetInfoPanel
(
this
,
wxID_ANY
),
1
,
_
(
"set info tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
StylePanel
(
this
,
wxID_ANY
),
2
,
_
(
"style tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
KeywordsPanel
(
this
,
wxID_ANY
),
3
,
_
(
"keywords tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
StatsPanel
(
this
,
wxID_ANY
),
4
,
_
(
"stats tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
CardsPanel
(
this
,
wxID_ANY
),
0
,
_
(
"
window_cards"
),
_
(
"
cards tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
SetInfoPanel
(
this
,
wxID_ANY
),
1
,
_
(
"
window_set_info"
),
_
(
"
set info tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
StylePanel
(
this
,
wxID_ANY
),
2
,
_
(
"
window_style"
),
_
(
"
style tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
KeywordsPanel
(
this
,
wxID_ANY
),
3
,
_
(
"
window_keywords"
),
_
(
"
keywords tab"
));
addPanel
(
menuWindow
,
tabBar
,
new
StatsPanel
(
this
,
wxID_ANY
),
4
,
_
(
"
window_statistics"
),
_
(
"
stats tab"
));
// addPanel(*s, *menuWindow, *tabBar, new DraftPanel (&this, wxID_ANY), 5, _("F10"))
selectPanel
(
ID_WINDOW_CARDS
);
// select cards panel
...
...
@@ -178,7 +178,7 @@ SetWindow::~SetWindow() {
// ----------------------------------------------------------------------------- : Panel managment
void
SetWindow
::
addPanel
(
wxMenu
*
windowMenu
,
wxToolBar
*
tabBar
,
SetWindowPanel
*
panel
,
UInt
pos
,
const
String
&
name
)
{
void
SetWindow
::
addPanel
(
IconMenu
*
windowMenu
,
wxToolBar
*
tabBar
,
SetWindowPanel
*
panel
,
UInt
pos
,
const
String
&
image_name
,
const
String
&
name
)
{
// insert in list
if
(
panels
.
size
()
<=
pos
)
panels
.
resize
(
pos
+
1
);
panels
[
pos
]
=
panel
;
...
...
@@ -189,9 +189,10 @@ void SetWindow::addPanel(wxMenu* windowMenu, wxToolBar* tabBar, SetWindowPanel*
String
tab_help
=
tr
(
LOCALE_CAT_TOOLTIP
,
name
);
// add to tab bar
int
id
=
ID_WINDOW_MIN
+
pos
;
tabBar
->
AddTool
(
id
,
tab_name
,
wxNullBitmap
,
wxNullBitmap
,
wxITEM_CHECK
,
tab_help
,
description
);
tabBar
->
AddTool
(
id
,
tab_name
+
_
(
" "
),
load_resource_tool_image
(
image_name
),
wxNullBitmap
,
wxITEM_CHECK
,
tab_help
,
description
);
tabBar
->
AddSeparator
();
// add to menu bar
windowMenu
->
Append
CheckItem
(
id
,
menu_name
,
description
);
windowMenu
->
Append
(
id
,
image_name
,
menu_name
,
description
,
wxITEM_CHECK
);
// add to sizer
GetSizer
()
->
Add
(
panel
,
1
,
wxEXPAND
);
}
...
...
src/gui/set/window.hpp
View file @
e6867623
...
...
@@ -53,7 +53,7 @@ class SetWindow : public wxFrame, public SetView {
/// Add a panel to the window, as well as to the menu and tab bar
/** The position only determines the order in which events will be send.
*/
void
addPanel
(
wxMenu
*
windowMenu
,
wxToolBar
*
tabBar
,
SetWindowPanel
*
panel
,
UInt
pos
,
const
String
&
name
);
void
addPanel
(
IconMenu
*
windowMenu
,
wxToolBar
*
tabBar
,
SetWindowPanel
*
panel
,
UInt
pos
,
const
String
&
image_name
,
const
String
&
name
);
/// Select a panel, based on a tab id
void
selectPanel
(
int
id
);
...
...
src/gui/value/symbol.cpp
View file @
e6867623
...
...
@@ -8,12 +8,15 @@
#include <gui/value/symbol.hpp>
#include <gui/symbol/window.hpp>
#include <gui/util.hpp>
// ----------------------------------------------------------------------------- : SymbolValueEditor
IMPLEMENT_VALUE_EDITOR
(
Symbol
)
,
button_down
(
-
2
)
{}
{
button_images
[
0
]
=
Bitmap
(
load_resource_image
(
_
(
"edit_symbol"
)));
}
void
SymbolValueEditor
::
draw
(
RotatedDC
&
dc
)
{
SymbolValueViewer
::
draw
(
dc
);
...
...
@@ -27,8 +30,8 @@ void SymbolValueEditor::draw(RotatedDC& dc) {
if
(
nativeLook
())
{
// draw editor buttons
dc
.
SetFont
(
*
wxNORMAL_FONT
);
drawButton
(
dc
,
0
,
_
(
"Edit
"
));
drawButton
(
dc
,
1
,
_
(
"G
allery"
));
drawButton
(
dc
,
0
,
_
BUTTON_
(
"edit symbol
"
));
//drawButton(dc, 1, _BUTTON_("symbol g
allery"));
}
}
void
SymbolValueEditor
::
drawButton
(
RotatedDC
&
dc
,
int
button
,
const
String
&
text
)
{
...
...
@@ -49,6 +52,10 @@ void SymbolValueEditor::drawButton(RotatedDC& dc, int button, const String& text
// draw text
RealSize
text_size
=
dc
.
GetTextExtent
(
text
);
dc
.
DrawText
(
text
,
align_in_rect
((
Alignment
)(
ALIGN_BOTTOM
|
ALIGN_CENTER
),
text_size
,
RealRect
(
x
,
y
,
size
,
size
*
0.9
)));
// draw image
const
Bitmap
&
bmp
=
button_images
[
button
];
RealSize
image_size
(
bmp
.
GetWidth
(),
bmp
.
GetHeight
());
dc
.
DrawBitmap
(
bmp
,
align_in_rect
(
ALIGN_MIDDLE_CENTER
,
image_size
,
RealRect
(
x
,
y
,
size
,
size
*
0.8
)));
}
int
SymbolValueEditor
::
findButton
(
const
RealPoint
&
pos
)
{
...
...
src/gui/value/symbol.hpp
View file @
e6867623
...
...
@@ -34,6 +34,7 @@ class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
// button, or -1 for mouse down, but not on button, or -2 for mouse not down
int
button_down
;
Bitmap
button_images
[
1
];
};
// ----------------------------------------------------------------------------- : EOF
...
...
src/resource/common/edit_symbol.png
0 → 100644
View file @
e6867623
341 Bytes
src/resource/msw/mse.rc
View file @
e6867623
...
...
@@ -54,6 +54,12 @@ tool/card_rotate_270 IMAGE "tool/card_rotate_270.png"
tool/keyword_add IMAGE "tool/keyword_add.png"
tool/keyword_del IMAGE "tool/keyword_del.png"
tool/window_cards IMAGE "tool/window_cards.png"
tool/window_set_info IMAGE "tool/window_set_info.png"
tool/window_style IMAGE "tool/window_style.png"
tool/window_keywords IMAGE "tool/window_keywords.png"
tool/window_statistics IMAGE "tool/window_statistics.png"
tool/help IMAGE "tool/help.png"
// -------------------------------------------------------- : Symbol editor
...
...
@@ -141,6 +147,8 @@ welcome_new IMAGE "../common/welcome_new.png"
welcome_open IMAGE "../common/welcome_open.png"
welcome_last IMAGE "../common/welcome_last.png"
edit_symbol IMAGE "../common/edit_symbol.png"
// -------------------------------------------------------- : WX
wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp"
...
...
src/resource/msw/tool/print_preview.png
View replaced file @
7f037a96
View file @
e6867623
336 Bytes
|
W:
|
H:
339 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/resource/msw/tool/window_cards.png
0 → 100644
View file @
e6867623
362 Bytes
src/resource/msw/tool/window_keywords.png
0 → 100644
View file @
e6867623
657 Bytes
src/resource/msw/tool/window_set_info.png
0 → 100644
View file @
e6867623
354 Bytes
src/resource/msw/tool/window_statistics.png
0 → 100644
View file @
e6867623
469 Bytes
src/resource/msw/tool/window_style.png
0 → 100644
View file @
e6867623
568 Bytes
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