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
7a33fa32
Commit
7a33fa32
authored
Apr 12, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: "Double click to select image" text now always shown when editing;
Correct control used for clipboard actions in CardsPanel
parent
b534a0c1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
8 deletions
+24
-8
src/gui/control/card_editor.cpp
src/gui/control/card_editor.cpp
+3
-0
src/gui/control/card_editor.hpp
src/gui/control/card_editor.hpp
+1
-0
src/gui/set/cards_panel.cpp
src/gui/set/cards_panel.cpp
+14
-6
src/render/card/viewer.cpp
src/render/card/viewer.cpp
+1
-0
src/render/card/viewer.hpp
src/render/card/viewer.hpp
+3
-0
src/render/value/text.cpp
src/render/value/text.cpp
+2
-2
No files found.
src/gui/control/card_editor.cpp
View file @
7a33fa32
...
@@ -39,6 +39,9 @@ bool DataEditor::drawBorders() const {
...
@@ -39,6 +39,9 @@ bool DataEditor::drawBorders() const {
settings
.
stylesheetSettingsFor
(
*
set
->
stylesheetFor
(
card
)).
card_borders
();
settings
.
stylesheetSettingsFor
(
*
set
->
stylesheetFor
(
card
)).
card_borders
();
}
}
bool
DataEditor
::
drawEditing
()
const
{
bool
DataEditor
::
drawEditing
()
const
{
return
true
;
}
bool
DataEditor
::
drawFocus
()
const
{
return
FindFocus
()
==
this
;
return
FindFocus
()
==
this
;
}
}
...
...
src/gui/control/card_editor.hpp
View file @
7a33fa32
...
@@ -26,6 +26,7 @@ class DataEditor : public CardViewer {
...
@@ -26,6 +26,7 @@ class DataEditor : public CardViewer {
virtual
bool
drawBorders
()
const
;
virtual
bool
drawBorders
()
const
;
virtual
bool
drawEditing
()
const
;
virtual
bool
drawEditing
()
const
;
virtual
bool
drawFocus
()
const
;
virtual
wxPen
borderPen
(
bool
active
)
const
;
virtual
wxPen
borderPen
(
bool
active
)
const
;
virtual
ValueViewer
*
focusedViewer
()
const
;
virtual
ValueViewer
*
focusedViewer
()
const
;
...
...
src/gui/set/cards_panel.cpp
View file @
7a33fa32
...
@@ -249,12 +249,20 @@ bool CardsPanel::wantsToHandle(const Action&, bool undone) const {
...
@@ -249,12 +249,20 @@ bool CardsPanel::wantsToHandle(const Action&, bool undone) const {
// ----------------------------------------------------------------------------- : Clipboard
// ----------------------------------------------------------------------------- : Clipboard
bool
CardsPanel
::
canCut
()
const
{
return
focused_control
(
this
)
==
ID_EDITOR
?
editor
->
canCut
()
:
card_list
->
canCut
();
}
// determine what control to use for clipboard actions
bool
CardsPanel
::
canCopy
()
const
{
return
focused_control
(
this
)
==
ID_EDITOR
?
editor
->
canCopy
()
:
card_list
->
canCopy
();
}
#define CUT_COPY_PASTE(op,return) \
bool
CardsPanel
::
canPaste
()
const
{
return
focused_control
(
this
)
==
ID_EDITOR
?
editor
->
canPaste
()
:
card_list
->
canPaste
();
}
int
id
=
focused_control
(
this
);
\
void
CardsPanel
::
doCut
()
{
if
(
focused_control
(
this
)
==
ID_EDITOR
)
editor
->
doCut
();
else
card_list
->
doCut
();
}
if
(
id
==
ID_EDITOR
)
{
return
editor
->
op
();
}
\
void
CardsPanel
::
doCopy
()
{
if
(
focused_control
(
this
)
==
ID_EDITOR
)
editor
->
doCopy
();
else
card_list
->
doCopy
();
}
else
if
(
id
==
ID_CARD_LIST
)
{
return
card_list
->
op
();
}
\
void
CardsPanel
::
doPaste
()
{
if
(
focused_control
(
this
)
==
ID_EDITOR
)
editor
->
doPaste
();
else
card_list
->
doPaste
();
}
else
if
(
id
==
ID_NOTES
)
{
return
notes
->
op
();
}
\
else
{
return
false
;
}
bool
CardsPanel
::
canCut
()
const
{
CUT_COPY_PASTE
(
canCut
,
return
)
}
bool
CardsPanel
::
canCopy
()
const
{
CUT_COPY_PASTE
(
canCopy
,
return
)
}
bool
CardsPanel
::
canPaste
()
const
{
CUT_COPY_PASTE
(
canPaste
,
return
)
}
void
CardsPanel
::
doCut
()
{
CUT_COPY_PASTE
(
doCut
,
;)
}
void
CardsPanel
::
doCopy
()
{
CUT_COPY_PASTE
(
doCopy
,
;)
}
void
CardsPanel
::
doPaste
()
{
CUT_COPY_PASTE
(
doPaste
,
;)
}
// ----------------------------------------------------------------------------- : Searching
// ----------------------------------------------------------------------------- : Searching
...
...
src/render/card/viewer.cpp
View file @
7a33fa32
...
@@ -54,6 +54,7 @@ void DataViewer::drawViewer(RotatedDC& dc, ValueViewer& v) {
...
@@ -54,6 +54,7 @@ void DataViewer::drawViewer(RotatedDC& dc, ValueViewer& v) {
bool
DataViewer
::
nativeLook
()
const
{
return
false
;
}
bool
DataViewer
::
nativeLook
()
const
{
return
false
;
}
bool
DataViewer
::
drawBorders
()
const
{
return
false
;
}
bool
DataViewer
::
drawBorders
()
const
{
return
false
;
}
bool
DataViewer
::
drawEditing
()
const
{
return
false
;
}
bool
DataViewer
::
drawEditing
()
const
{
return
false
;
}
bool
DataViewer
::
drawFocus
()
const
{
return
false
;
}
wxPen
DataViewer
::
borderPen
(
bool
)
const
{
return
wxPen
();
}
wxPen
DataViewer
::
borderPen
(
bool
)
const
{
return
wxPen
();
}
ValueViewer
*
DataViewer
::
focusedViewer
()
const
{
return
nullptr
;
}
ValueViewer
*
DataViewer
::
focusedViewer
()
const
{
return
nullptr
;
}
Context
&
DataViewer
::
getContext
()
const
{
return
set
->
getContext
();
}
Context
&
DataViewer
::
getContext
()
const
{
return
set
->
getContext
();
}
...
...
src/render/card/viewer.hpp
View file @
7a33fa32
...
@@ -42,6 +42,9 @@ class DataViewer : public SetView {
...
@@ -42,6 +42,9 @@ class DataViewer : public SetView {
/// Should editing specific things be drawn?
/// Should editing specific things be drawn?
/** false by default, can be overloaded */
/** false by default, can be overloaded */
virtual
bool
drawEditing
()
const
;
virtual
bool
drawEditing
()
const
;
/// Should focus only editing specific things be drawn?
/** false by default, can be overloaded */
virtual
bool
drawFocus
()
const
;
/// Pens for drawing field borders (only called if drawBorders())
/// Pens for drawing field borders (only called if drawBorders())
virtual
wxPen
borderPen
(
bool
active
)
const
;
virtual
wxPen
borderPen
(
bool
active
)
const
;
/// The viewer that is currently focused, may be null
/// The viewer that is currently focused, may be null
...
...
src/render/value/text.cpp
View file @
7a33fa32
...
@@ -25,8 +25,8 @@ void TextValueViewer::draw(RotatedDC& dc) {
...
@@ -25,8 +25,8 @@ void TextValueViewer::draw(RotatedDC& dc) {
v
.
prepare
(
dc
,
value
().
value
(),
style
(),
viewer
.
getContext
());
v
.
prepare
(
dc
,
value
().
value
(),
style
(),
viewer
.
getContext
());
v
.
draw
(
dc
,
style
(),
(
DrawWhat
)(
v
.
draw
(
dc
,
style
(),
(
DrawWhat
)(
DRAW_NORMAL
DRAW_NORMAL
|
(
viewer
.
drawBorders
()
?
DRAW_BORDERS
:
0
)
|
(
viewer
.
drawBorders
()
?
DRAW_BORDERS
:
0
)
|
(
viewer
.
draw
Editing
()
&&
isCurrent
()
?
DRAW_ACTIVE
:
0
)
|
(
viewer
.
draw
Focus
()
&&
isCurrent
()
?
DRAW_ACTIVE
:
0
)
));
));
}
}
...
...
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