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
97c40278
Commit
97c40278
authored
May 07, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font choise for motif
parent
57f99b60
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
14 deletions
+115
-14
xtt/lib/ge/motif/ge_motif.cpp
xtt/lib/ge/motif/ge_motif.cpp
+22
-1
xtt/lib/ge/motif/ge_motif.h
xtt/lib/ge/motif/ge_motif.h
+5
-1
xtt/lib/glow/motif/glow_draw_xlib.cpp
xtt/lib/glow/motif/glow_draw_xlib.cpp
+8
-7
xtt/lib/glow/motif/glow_draw_xlib.h
xtt/lib/glow/motif/glow_draw_xlib.h
+3
-3
xtt/mmi/ge/motif/ge.uil
xtt/mmi/ge/motif/ge.uil
+77
-2
No files found.
xtt/lib/ge/motif/ge_motif.cpp
View file @
97c40278
/*
* Proview $Id: ge_motif.cpp,v 1.
3 2007-01-11 11:40:30
claes Exp $
* Proview $Id: ge_motif.cpp,v 1.
4 2007-05-07 15:45:18
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -950,6 +950,23 @@ void GeMotif::activate_textsize_5( Widget w, Ge *gectx, XmAnyCallbackStruct *dat
gectx
->
activate_textsize
(
5
);
}
void
GeMotif
::
activate_textfont_1
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
)
{
gectx
->
activate_textfont
(
glow_eFont_Helvetica
);
}
void
GeMotif
::
activate_textfont_2
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
)
{
gectx
->
activate_textfont
(
glow_eFont_Times
);
}
void
GeMotif
::
activate_textfont_3
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
)
{
gectx
->
activate_textfont
(
glow_eFont_NewCenturySchoolbook
);
}
void
GeMotif
::
activate_textfont_4
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
)
{
gectx
->
activate_textfont
(
glow_eFont_Courier
);
}
void
GeMotif
::
activate_textbold
(
Widget
w
,
Ge
*
gectx
,
XmToggleButtonCallbackStruct
*
data
)
{
gectx
->
activate_textbold
(
data
->
set
);
...
...
@@ -1412,6 +1429,10 @@ GeMotif::GeMotif( void *x_parent_ctx,
{
"ge_activate_textsize_3"
,(
caddr_t
)
GeMotif
::
activate_textsize_3
},
{
"ge_activate_textsize_4"
,(
caddr_t
)
GeMotif
::
activate_textsize_4
},
{
"ge_activate_textsize_5"
,(
caddr_t
)
GeMotif
::
activate_textsize_5
},
{
"ge_activate_textfont_1"
,(
caddr_t
)
GeMotif
::
activate_textfont_1
},
{
"ge_activate_textfont_2"
,(
caddr_t
)
GeMotif
::
activate_textfont_2
},
{
"ge_activate_textfont_3"
,(
caddr_t
)
GeMotif
::
activate_textfont_3
},
{
"ge_activate_textfont_4"
,(
caddr_t
)
GeMotif
::
activate_textfont_4
},
{
"ge_activate_textbold"
,(
caddr_t
)
GeMotif
::
activate_textbold
},
{
"ge_activate_gridsize_1"
,(
caddr_t
)
GeMotif
::
activate_gridsize_1
},
{
"ge_activate_gridsize_2"
,(
caddr_t
)
GeMotif
::
activate_gridsize_2
},
...
...
xtt/lib/ge/motif/ge_motif.h
View file @
97c40278
/*
* Proview $Id: ge_motif.h,v 1.
1 2007-01-04 08:22:16
claes Exp $
* Proview $Id: ge_motif.h,v 1.
2 2007-05-07 15:45:18
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -208,6 +208,10 @@ class GeMotif : public Ge {
static
void
activate_textsize_3
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textsize_4
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textsize_5
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textfont_1
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textfont_2
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textfont_3
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textfont_4
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_textbold
(
Widget
w
,
Ge
*
gectx
,
XmToggleButtonCallbackStruct
*
data
);
static
void
activate_zoom_in
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
static
void
activate_zoom_out
(
Widget
w
,
Ge
*
gectx
,
XmAnyCallbackStruct
*
data
);
...
...
xtt/lib/glow/motif/glow_draw_xlib.cpp
View file @
97c40278
/*
* Proview $Id: glow_draw_xlib.cpp,v 1.
3 2007-05-07 14:35:03
claes Exp $
* Proview $Id: glow_draw_xlib.cpp,v 1.
4 2007-05-07 15:45:18
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -275,7 +275,7 @@ static int glow_create_cursor( GlowDrawXLib *draw_ctx)
static
int
draw_free_gc
(
GlowDrawXLib
*
draw_ctx
)
{
int
i
,
j
;
int
i
,
j
,
k
;
for
(
i
=
1
;
i
<
glow_eDrawCursor__
;
i
++
)
XFreeCursor
(
draw_ctx
->
display
,
draw_ctx
->
cursors
[
i
]);
...
...
@@ -2067,6 +2067,7 @@ int GlowDrawXLib::get_text_extent( char *text, int len,
int
text_direction
,
text_ascent
,
text_descent
;
XCharStruct
char_struct
;
int
font_type
=
get_font_type
(
gc_type
);
load_font
(
font_idx
,
font_type
,
idx
);
XTextExtents
(
font_struct
[
font_idx
][
font_type
][
idx
],
text
,
len
,
&
text_direction
,
&
text_ascent
,
&
text_descent
,
&
char_struct
);
...
...
@@ -2488,10 +2489,10 @@ int GlowDrawXLib::draw_points( GlowWind *wind, glow_sPointX *points, int point_n
void
GlowDrawXLib
::
load_font
(
glow_eFont
font_idx
,
int
font_type
,
int
idx
)
{
if
(
!
font
[
font_idx
][
font_type
][
idx
])
{
Font
f
ont
=
XLoadFont
(
draw_ctx
->
display
,
font_names
[
font_idx
][
font_type
][
idx
]);
draw_ctx
->
font
[
font_idx
][
font_type
][
idx
]
=
fo
nt
;
draw_ctx
->
font_struct
[
font_idx
][
font_type
][
idx
]
=
XQueryFont
(
d
raw_ctx
->
display
,
fo
nt
);
Font
f
nt
=
XLoadFont
(
display
,
font_names
[
font_idx
][
font_type
][
idx
]);
font
[
font_idx
][
font_type
][
idx
]
=
f
nt
;
font_struct
[
font_idx
][
font_type
][
idx
]
=
XQueryFont
(
d
isplay
,
f
nt
);
}
}
...
...
@@ -2704,7 +2705,7 @@ int GlowDrawXLib::print( char *filename, double x0, double x1, int end)
if
(
new_file
)
{
ps
->
fp
<<
"%!PS-Adobe-2.0 EPSF-1.2"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_xlib.cpp,v 1.
3 2007-05-07 14:35:03
claes Exp $ Glow"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_xlib.cpp,v 1.
4 2007-05-07 15:45:18
claes Exp $ Glow"
<<
endl
<<
"%%EndComments"
<<
endl
<<
endl
;
}
else
...
...
xtt/lib/glow/motif/glow_draw_xlib.h
View file @
97c40278
/*
* Proview $Id: glow_draw_xlib.h,v 1.
3 2007-05-07 14:35:03
claes Exp $
* Proview $Id: glow_draw_xlib.h,v 1.
4 2007-05-07 15:45:18
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -100,7 +100,7 @@ class GlowDrawXLib : public GlowDraw {
GC
gc_inverse
;
GC
gcs
[
glow_eDrawType__
][
DRAW_TYPE_SIZE
];
XFontStruct
*
font_struct
[
glow_eFont__
][
glow_eDrawFont__
][
DRAW_FONT_SIZE
];
Font
font
[
glow_eFont
][
glow_eDrawFont__
][
DRAW_FONT_SIZE
];
Font
font
[
glow_eFont
__
][
glow_eDrawFont__
][
DRAW_FONT_SIZE
];
int
cursors
[
glow_eDrawCursor__
];
int
ef
;
// int (*event_handler)(glow_eEvent event, int x, int y, int w, int h);
...
...
@@ -174,7 +174,7 @@ class GlowDrawXLib : public GlowDraw {
virtual
void
set_cursor
(
GlowWind
*
w
,
glow_eDrawCursor
cursor
);
virtual
int
get_text_extent
(
char
*
text
,
int
len
,
glow_eDrawType
gc_type
,
int
idx
,
i
nt
font_idx
,
glow_eDrawType
gc_type
,
int
idx
,
glow_eFo
nt
font_idx
,
int
*
width
,
int
*
height
,
int
*
descent
);
virtual
void
copy_area
(
GlowWind
*
w
,
int
x
,
int
y
);
virtual
void
clear_area
(
GlowWind
*
w
,
int
ll_x
,
int
ur_x
,
int
ll_y
,
int
ur_y
);
...
...
xtt/mmi/ge/motif/ge.uil
View file @
97c40278
!
! Proview $Id: ge.uil,v 1.
1 2007-01-04 08:39:37
claes Exp $
! Proview $Id: ge.uil,v 1.
2 2007-05-07 15:45:18
claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
...
...
@@ -498,11 +498,15 @@ procedure
ge_activate_linetype6(integer);
ge_activate_linetype7(integer);
ge_activate_textsize_0(integer);
ge_activate_textsize_1(integer);
ge_activate_textsize_1(integer);
ge_activate_textsize_2(integer);
ge_activate_textsize_3(integer);
ge_activate_textsize_4(integer);
ge_activate_textsize_5(integer);
ge_activate_textfont_1(integer);
ge_activate_textfont_2(integer);
ge_activate_textfont_3(integer);
ge_activate_textfont_4(integer);
ge_activate_textbold(integer);
ge_activate_gridsize_1(integer);
ge_activate_gridsize_2(integer);
...
...
@@ -1358,6 +1362,77 @@ object functions_entry : XmCascadeButton
};
};
};
XmCascadeButton
{
arguments
{
XmNlabelString = compound_string("Font");
XmNmnemonic = keysym('f');
XmNfontList = menu_font;
};
controls
{
XmPulldownMenu
{
arguments
{
XmNradioBehavior = true;
XmNradioAlwaysOne = true;
};
controls
{
XmToggleButton
{
arguments
{
XmNlabelString = compound_string("Helvetica");
XmNfontList = menu_font;
};
callbacks
{
XmNvalueChangedCallback = procedure ge_activate_textfont_1(ge_ctx);
};
};
XmToggleButton
{
arguments
{
XmNlabelString = compound_string("Times");
XmNfontList = menu_font;
};
callbacks
{
XmNvalueChangedCallback = procedure ge_activate_textfont_2(ge_ctx);
};
};
XmToggleButton
{
arguments
{
XmNlabelString = compound_string("New Century Schoolbook");
XmNfontList = menu_font;
};
callbacks
{
XmNvalueChangedCallback = procedure ge_activate_textfont_3(ge_ctx);
};
};
XmToggleButton
{
arguments
{
XmNlabelString = compound_string("Courier");
XmNfontList = menu_font;
};
callbacks
{
XmNvalueChangedCallback = procedure ge_activate_textfont_4(ge_ctx);
};
};
};
};
};
};
XmPushButton
{
arguments
...
...
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