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
71cee587
Commit
71cee587
authored
Apr 22, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy&paste for keywords panel;
Fixed: initialization of 'direction' for TextStyle
parent
45cd5cf6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
5 deletions
+36
-5
src/data/field/text.cpp
src/data/field/text.cpp
+1
-0
src/gui/set/keywords_panel.cpp
src/gui/set/keywords_panel.cpp
+26
-4
src/gui/set/keywords_panel.hpp
src/gui/set/keywords_panel.hpp
+8
-0
src/util/window_id.hpp
src/util/window_id.hpp
+1
-1
No files found.
src/data/field/text.cpp
View file @
71cee587
...
@@ -53,6 +53,7 @@ TextStyle::TextStyle(const TextFieldP& field)
...
@@ -53,6 +53,7 @@ TextStyle::TextStyle(const TextFieldP& field)
,
line_height_soft
(
1.0
)
,
line_height_soft
(
1.0
)
,
line_height_hard
(
1.0
)
,
line_height_hard
(
1.0
)
,
line_height_line
(
1.0
)
,
line_height_line
(
1.0
)
,
direction
(
LEFT_TO_RIGHT
)
{}
{}
bool
TextStyle
::
update
(
Context
&
ctx
)
{
bool
TextStyle
::
update
(
Context
&
ctx
)
{
...
...
src/gui/set/keywords_panel.cpp
View file @
71cee587
...
@@ -35,10 +35,10 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id)
...
@@ -35,10 +35,10 @@ KeywordsPanel::KeywordsPanel(Window* parent, int id)
splitter
=
new
wxSplitterWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
splitter
=
new
wxSplitterWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
list
=
new
KeywordList
(
splitter
,
wxID_ANY
);
list
=
new
KeywordList
(
splitter
,
wxID_ANY
);
panel
=
new
Panel
(
splitter
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
/* no tab traversal*/
);
panel
=
new
Panel
(
splitter
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
/* no tab traversal*/
);
keyword
=
new
TextCtrl
(
panel
,
wxID_ANY
,
false
);
keyword
=
new
TextCtrl
(
panel
,
ID_KEYWORD
,
false
);
match
=
new
TextCtrl
(
panel
,
wxID_ANY
,
false
);
match
=
new
TextCtrl
(
panel
,
ID_MATCH
,
false
);
reminder
=
new
TextCtrl
(
panel
,
wxID_ANY
,
true
);
// allow multiline for wordwrap
reminder
=
new
TextCtrl
(
panel
,
ID_REMINDER
,
true
);
// allow multiline for wordwrap
rules
=
new
TextCtrl
(
panel
,
wxID_ANY
,
true
);
rules
=
new
TextCtrl
(
panel
,
ID_RULES
,
true
);
errors
=
new
wxStaticText
(
panel
,
wxID_ANY
,
_
(
""
));
errors
=
new
wxStaticText
(
panel
,
wxID_ANY
,
_
(
""
));
errors
->
SetForegroundColour
(
*
wxRED
);
errors
->
SetForegroundColour
(
*
wxRED
);
mode
=
new
wxChoice
(
panel
,
ID_KEYWORD_MODE
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
nullptr
);
mode
=
new
wxChoice
(
panel
,
ID_KEYWORD_MODE
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
nullptr
);
...
@@ -222,6 +222,28 @@ String KeywordsPanel::runRefScript(int find_i) {
...
@@ -222,6 +222,28 @@ String KeywordsPanel::runRefScript(int find_i) {
return
wxEmptyString
;
return
wxEmptyString
;
}
}
// ----------------------------------------------------------------------------- : Clipboard
// determine what control to use for clipboard actions
#define CUT_COPY_PASTE(op,return) \
int
id
=
focused_control
(
this
);
\
if
(
id
==
ID_KEYWORD
&&
keyword
->
IsEnabled
())
{
return
keyword
->
op
();
}
\
else
if
(
id
==
ID_MATCH
&&
match
->
IsEnabled
())
{
return
match
->
op
();
}
\
else
if
(
id
==
ID_REMINDER
&&
reminder
->
IsEnabled
())
{
return
reminder
->
op
();
}
\
else
if
(
id
==
ID_RULES
&&
rules
->
IsEnabled
())
{
return
rules
->
op
();
}
\
else
{
return
false
;
}
bool
KeywordsPanel
::
canCopy
()
const
{
CUT_COPY_PASTE
(
canCopy
,
return
)
}
bool
KeywordsPanel
::
canCut
()
const
{
if
(
!
list
->
getKeyword
()
||
list
->
getKeyword
()
->
fixed
)
return
false
;
CUT_COPY_PASTE
(
canCut
,
return
)
}
bool
KeywordsPanel
::
canPaste
()
const
{
if
(
!
list
->
getKeyword
()
||
list
->
getKeyword
()
->
fixed
)
return
false
;
CUT_COPY_PASTE
(
canPaste
,
return
)
}
void
KeywordsPanel
::
doCopy
()
{
CUT_COPY_PASTE
(
doCopy
,
;)
}
void
KeywordsPanel
::
doCut
()
{
if
(
!
list
->
getKeyword
()
||
list
->
getKeyword
()
->
fixed
)
return
;
CUT_COPY_PASTE
(
doCut
,
;)
}
void
KeywordsPanel
::
doPaste
()
{
if
(
!
list
->
getKeyword
()
||
list
->
getKeyword
()
->
fixed
)
return
;
CUT_COPY_PASTE
(
doPaste
,
;)
}
// ----------------------------------------------------------------------------- : Events
// ----------------------------------------------------------------------------- : Events
void
KeywordsPanel
::
onChangeSet
()
{
void
KeywordsPanel
::
onChangeSet
()
{
...
...
src/gui/set/keywords_panel.hpp
View file @
71cee587
...
@@ -36,6 +36,14 @@ class KeywordsPanel : public SetWindowPanel {
...
@@ -36,6 +36,14 @@ class KeywordsPanel : public SetWindowPanel {
virtual
void
onUpdateUI
(
wxUpdateUIEvent
&
);
virtual
void
onUpdateUI
(
wxUpdateUIEvent
&
);
virtual
void
onCommand
(
int
id
);
virtual
void
onCommand
(
int
id
);
// --------------------------------------------------- : Clipboard
virtual
bool
canCut
()
const
;
virtual
bool
canCopy
()
const
;
virtual
bool
canPaste
()
const
;
virtual
void
doCut
();
virtual
void
doCopy
();
virtual
void
doPaste
();
private:
private:
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
...
...
src/util/window_id.hpp
View file @
71cee587
...
@@ -191,7 +191,7 @@ enum ControlID {
...
@@ -191,7 +191,7 @@ enum ControlID {
,
ID_STYLESHEET_LIST
,
ID_STYLESHEET_LIST
,
ID_NOTES
,
ID_NOTES
,
ID_KEYWORD
,
ID_KEYWORD
,
ID_
PARAMETER
,
ID_
MATCH
,
ID_REMINDER
,
ID_REMINDER
,
ID_RULES
,
ID_RULES
// Card list column select
// Card list column select
...
...
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