Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Esteban Blanc
proview
Commits
cee6758e
Commit
cee6758e
authored
Sep 06, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PageUp and PageDown in xtt implemented
parent
7050433d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
3 deletions
+71
-3
xtt/exe/rt_xtt/src/rt_xtt.cpp
xtt/exe/rt_xtt/src/rt_xtt.cpp
+8
-1
xtt/lib/flow/src/flow_browapi.cpp
xtt/lib/flow/src/flow_browapi.cpp
+5
-0
xtt/lib/flow/src/flow_browapi.h
xtt/lib/flow/src/flow_browapi.h
+1
-0
xtt/lib/flow/src/flow_browctx.cpp
xtt/lib/flow/src/flow_browctx.cpp
+30
-0
xtt/lib/flow/src/flow_browctx.h
xtt/lib/flow/src/flow_browctx.h
+2
-0
xtt/lib/flow/src/flow_draw.cpp
xtt/lib/flow/src/flow_draw.cpp
+2
-0
xtt/lib/xtt/src/xtt_clognav.cpp
xtt/lib/xtt/src/xtt_clognav.cpp
+12
-0
xtt/lib/xtt/src/xtt_url.cpp
xtt/lib/xtt/src/xtt_url.cpp
+3
-2
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+8
-0
No files found.
xtt/exe/rt_xtt/src/rt_xtt.cpp
View file @
cee6758e
...
...
@@ -47,6 +47,7 @@ extern "C" {
#include "rt_trace.h"
#include "xtt_xnav.h"
#include "xtt_item.h"
#include "xtt_url.h"
#include "co_lng.h"
#include "co_xhelp.h"
#include "rt_xnav_msg.h"
...
...
@@ -233,6 +234,11 @@ static void xtt_hotkey_ResetDig( Widget w, XKeyEvent* ev, String* av, Cardinal*
printf
(
"rt_xtt hotkey: SetDig. Can't get %s
\n
"
,
name
);
}
static
void
xtt_open_URL_cb
(
void
*
ctx
,
char
*
url
)
{
xnav_open_URL
(
url
);
}
static
void
xtt_qcom_events
(
Xtt
*
xtt
)
{
char
mp
[
2000
];
...
...
@@ -1045,7 +1051,8 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
xnav
->
set_dimension_cb
=
&
xtt_set_dimension
;
// Create help window
CoXHelp
*
xhelp
=
new
CoXHelp
(
toplevel
,
0
,
xhelp_eUtility_Xtt
,
&
sts
);
CoXHelp
*
xhelp
=
new
CoXHelp
(
toplevel
,
this
,
xhelp_eUtility_Xtt
,
&
sts
);
xhelp
->
open_URL_cb
=
xtt_open_URL_cb
;
CoXHelp
::
set_default
(
xhelp
);
XtRealizeWidget
(
toplevel
);
...
...
xtt/lib/flow/src/flow_browapi.cpp
View file @
cee6758e
...
...
@@ -679,6 +679,11 @@ int brow_IsVisible( brow_tCtx ctx, brow_tObject object)
return
ctx
->
is_visible
(
(
FlowArrayElem
*
)
object
);
}
int
brow_Page
(
brow_tCtx
ctx
,
double
factor
)
{
return
ctx
->
page
(
factor
);
}
extern
"C"
int
brow_CreateSecondaryCtx
(
brow_tCtx
ctx
,
brow_tCtx
*
secondary_ctx
,
int
(
*
init_proc
)(
brow_tCtx
ctx
,
void
*
client_data
),
void
*
client_data
,
...
...
xtt/lib/flow/src/flow_browapi.h
View file @
cee6758e
...
...
@@ -199,6 +199,7 @@ int brow_GetNextSibling( brow_tCtx ctx, brow_tObject object,
int
brow_GetPreviousSibling
(
brow_tCtx
ctx
,
brow_tObject
object
,
brow_tObject
*
sibling
);
int
brow_IsVisible
(
brow_tCtx
ctx
,
brow_tObject
object
);
int
brow_Page
(
brow_tCtx
ctx
,
double
factor
);
int
brow_CreateSecondaryCtx
(
brow_tCtx
ctx
,
brow_tCtx
*
secondary_ctx
,
int
(
*
init_proc
)(
brow_tCtx
ctx
,
void
*
client_data
),
void
*
client_data
,
...
...
xtt/lib/flow/src/flow_browctx.cpp
View file @
cee6758e
...
...
@@ -215,6 +215,36 @@ void BrowCtx::center_object( FlowArrayElem *object, double factor)
change_scrollbar
();
}
int
BrowCtx
::
page
(
double
factor
)
{
double
ll_x
,
ll_y
,
ur_x
,
ur_y
;
int
new_offset_y
;
new_offset_y
=
offset_y
+
int
(
factor
*
window_height
);
if
(
factor
<
0
)
{
if
(
offset_y
<=
0
)
return
0
;
if
(
new_offset_y
<
0
)
new_offset_y
=
0
;
}
if
(
factor
>
0
)
{
FlowArrayElem
*
e
;
int
sts
;
sts
=
a
.
get_last
(
&
e
);
if
(
EVEN
(
sts
))
return
0
;
((
FlowNode
*
)
e
)
->
measure
(
&
ll_x
,
&
ll_y
,
&
ur_x
,
&
ur_y
);
if
(
new_offset_y
>
ur_y
*
zoom_factor
)
return
0
;
}
scroll
(
0
,
offset_y
-
new_offset_y
);
change_scrollbar
();
return
1
;
}
void
brow_scroll_horizontal
(
BrowCtx
*
ctx
,
int
value
,
int
bottom
)
{
int
x_pix
;
...
...
xtt/lib/flow/src/flow_browctx.h
View file @
cee6758e
...
...
@@ -39,6 +39,8 @@ class BrowCtx : public FlowCtx {
{
return
a
.
brow_get_previous_sibling
(
element
,
sibling
);};
int
is_visible
(
FlowArrayElem
*
element
);
void
center_object
(
FlowArrayElem
*
object
,
double
factor
);
int
page
(
double
factor
);
~
BrowCtx
()
{};
double
indentation
;
double
frame_x_right
;
...
...
xtt/lib/flow/src/flow_draw.cpp
View file @
cee6758e
...
...
@@ -575,9 +575,11 @@ int draw_event_handler( FlowCtx *ctx, XEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_Key_Left
,
0
,
0
,
0
,
0
);
break
;
case
XK_Page_Up
:
case
0xFF41
:
sts
=
ctx
->
event_handler
(
flow_eEvent_Key_PageUp
,
0
,
0
,
0
,
0
);
break
;
case
XK_Page_Down
:
case
0xFF42
:
sts
=
ctx
->
event_handler
(
flow_eEvent_Key_PageDown
,
0
,
0
,
0
,
0
);
break
;
case
XK_BackSpace
:
...
...
xtt/lib/xtt/src/xtt_clognav.cpp
View file @
cee6758e
...
...
@@ -264,6 +264,10 @@ void CLogNavBrow::brow_setup()
clognav_brow_cb
);
brow_EnableEvent
(
ctx
,
flow_eEvent_Key_Down
,
flow_eEventType_CallBack
,
clognav_brow_cb
);
brow_EnableEvent
(
ctx
,
flow_eEvent_Key_PageUp
,
flow_eEventType_CallBack
,
clognav_brow_cb
);
brow_EnableEvent
(
ctx
,
flow_eEvent_Key_PageDown
,
flow_eEventType_CallBack
,
clognav_brow_cb
);
brow_EnableEvent
(
ctx
,
flow_eEvent_Key_Right
,
flow_eEventType_CallBack
,
clognav_brow_cb
);
brow_EnableEvent
(
ctx
,
flow_eEvent_Key_Left
,
flow_eEventType_CallBack
,
...
...
@@ -704,6 +708,14 @@ static int clognav_brow_cb( FlowCtx *ctx, flow_tEvent event)
free
(
node_list
);
break
;
}
case
flow_eEvent_Key_PageDown
:
{
brow_Page
(
clognav
->
brow
->
ctx
,
0.9
);
break
;
}
case
flow_eEvent_Key_PageUp
:
{
brow_Page
(
clognav
->
brow
->
ctx
,
-
0.9
);
break
;
}
case
flow_eEvent_SelectClear
:
brow_ResetSelectInverse
(
clognav
->
brow
->
ctx
);
break
;
...
...
xtt/lib/xtt/src/xtt_url.cpp
View file @
cee6758e
...
...
@@ -39,12 +39,13 @@ int xnav_open_URL( pwr_tURL url)
replace_symbol
(
url
,
url
,
config_p
);
}
if
(
strcmp
(
browser
,
"mozilla"
)
==
0
)
{
if
(
strcmp
(
browser
,
"mozilla"
)
==
0
||
strcmp
(
browser
,
"rt_mozilla"
)
==
0
)
{
// Try remote display first
sprintf
(
cmd
,
"%s -remote
\"
openurl(%s,new-window)
\"
"
,
browser
,
url
);
sts
=
system
(
cmd
);
if
(
sts
)
{
// Not started yet
// Not started yet
sprintf
(
cmd
,
"%s %s &"
,
browser
,
url
);
system
(
cmd
);
}
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
cee6758e
...
...
@@ -1662,6 +1662,14 @@ static int xnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
free
(
node_list
);
break
;
}
case
flow_eEvent_Key_PageDown
:
{
brow_Page
(
xnav
->
brow
->
ctx
,
0.8
);
break
;
}
case
flow_eEvent_Key_PageUp
:
{
brow_Page
(
xnav
->
brow
->
ctx
,
-
0.8
);
break
;
}
case
flow_eEvent_Key_PF1
:
case
flow_eEvent_Key_ShiftRight
:
{
...
...
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