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
f8d23544
Commit
f8d23544
authored
Aug 11, 2008
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
card viewers/editors inherit from wxPanel;
GallertList doesn't call select() from onSize
parent
68f2d425
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
src/gui/control/card_editor.cpp
src/gui/control/card_editor.cpp
+1
-1
src/gui/control/card_viewer.cpp
src/gui/control/card_viewer.cpp
+1
-1
src/gui/control/card_viewer.hpp
src/gui/control/card_viewer.hpp
+1
-1
src/gui/control/gallery_list.cpp
src/gui/control/gallery_list.cpp
+11
-2
src/gui/control/text_ctrl.cpp
src/gui/control/text_ctrl.cpp
+1
-1
No files found.
src/gui/control/card_editor.cpp
View file @
f8d23544
...
@@ -65,7 +65,7 @@ void DataEditor::addAction(Action* action) {
...
@@ -65,7 +65,7 @@ void DataEditor::addAction(Action* action) {
// ----------------------------------------------------------------------------- : Selection
// ----------------------------------------------------------------------------- : Selection
bool
DataEditor
::
AcceptsFocus
()
const
{
bool
DataEditor
::
AcceptsFocus
()
const
{
return
wx
Control
::
AcceptsFocus
();
return
wx
Window
::
AcceptsFocus
();
}
}
void
DataEditor
::
select
(
ValueViewer
*
v
)
{
void
DataEditor
::
select
(
ValueViewer
*
v
)
{
...
...
src/gui/control/card_viewer.cpp
View file @
f8d23544
...
@@ -20,7 +20,7 @@ DEFINE_EVENT_TYPE(EVENT_SIZE_CHANGE);
...
@@ -20,7 +20,7 @@ DEFINE_EVENT_TYPE(EVENT_SIZE_CHANGE);
// ----------------------------------------------------------------------------- : CardViewer
// ----------------------------------------------------------------------------- : CardViewer
CardViewer
::
CardViewer
(
Window
*
parent
,
int
id
,
long
style
)
CardViewer
::
CardViewer
(
Window
*
parent
,
int
id
,
long
style
)
:
wx
Control
(
parent
,
id
,
wxDefaultPosition
,
wxDefaultSize
,
style
)
:
wx
Panel
(
parent
,
id
,
wxDefaultPosition
,
wxDefaultSize
,
style
&
wxNO_BORDER
?
style
:
style
|
wxSUNKEN_BORDER
)
,
up_to_date
(
false
)
,
up_to_date
(
false
)
{}
{}
...
...
src/gui/control/card_viewer.hpp
View file @
f8d23544
...
@@ -22,7 +22,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
...
@@ -22,7 +22,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
// ----------------------------------------------------------------------------- : CardViewer
// ----------------------------------------------------------------------------- : CardViewer
/// A control to view a single card
/// A control to view a single card
class
CardViewer
:
public
wx
Contro
l
,
public
DataViewer
{
class
CardViewer
:
public
wx
Pane
l
,
public
DataViewer
{
public:
public:
CardViewer
(
Window
*
parent
,
int
id
,
long
style
=
0
);
CardViewer
(
Window
*
parent
,
int
id
,
long
style
=
0
);
...
...
src/gui/control/gallery_list.cpp
View file @
f8d23544
...
@@ -72,8 +72,17 @@ void GalleryList::select(size_t item, size_t subcolumn, bool event) {
...
@@ -72,8 +72,17 @@ void GalleryList::select(size_t item, size_t subcolumn, bool event) {
}
}
void
GalleryList
::
update
()
{
void
GalleryList
::
update
()
{
select
(
subcolumns
[
active_subcolumn
].
selection
);
// ensure selection is visible
updateScrollbar
();
SubColumn
col
=
subcolumns
[
active_subcolumn
];
if
(
col
.
selection
!=
NO_SELECTION
)
{
if
(
itemStart
(
col
.
selection
)
<
visible_start
)
{
scrollTo
(
itemStart
(
col
.
selection
),
false
);
updateScrollbar
();
}
else
if
(
itemEnd
(
col
.
selection
)
>
visibleEnd
())
{
scrollTo
(
itemEnd
(
col
.
selection
)
+
visible_start
-
visibleEnd
(),
false
);
updateScrollbar
();
}
}
Refresh
(
false
);
Refresh
(
false
);
}
}
...
...
src/gui/control/text_ctrl.cpp
View file @
f8d23544
...
@@ -37,7 +37,7 @@ void TextCtrl::draw(DC& dc) {
...
@@ -37,7 +37,7 @@ void TextCtrl::draw(DC& dc) {
}
}
bool
TextCtrl
::
AcceptsFocus
()
const
{
bool
TextCtrl
::
AcceptsFocus
()
const
{
return
wx
Control
::
AcceptsFocus
()
&&
return
wx
Window
::
AcceptsFocus
()
&&
!
viewers
.
empty
()
&&
!
viewers
.
empty
()
&&
static_cast
<
FakeTextValue
&>
(
*
viewers
.
front
()
->
getValue
()).
editable
;
static_cast
<
FakeTextValue
&>
(
*
viewers
.
front
()
->
getValue
()).
editable
;
}
}
...
...
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