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
485d3e92
Commit
485d3e92
authored
May 20, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function to get text from XmLabel added
parent
9600a8df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
src/lib/co/src/co_wow.c
src/lib/co/src/co_wow.c
+45
-0
src/lib/co/src/co_wow.h
src/lib/co/src/co_wow.h
+5
-0
No files found.
src/lib/co/src/co_wow.c
View file @
485d3e92
...
...
@@ -592,6 +592,51 @@ void wow_CreateFileSelDia( Widget parent_wid,
XmStringFree
(
cpattern
);
}
void
wow_GetLabel
(
Widget
w
,
char
*
label
)
{
Arg
arg
[
1
];
XmString
latinstr
;
XtSetArg
(
arg
[
0
],
XmNlabelString
,
&
latinstr
);
XtGetValues
(
w
,
arg
,
1
);
wow_GetCSText
(
latinstr
,
label
);
XmStringFree
(
latinstr
);
}
void
wow_GetCSText
(
XmString
ar_value
,
char
*
t_buffer
)
{
char
*
first_seg
;
XmStringContext
context
;
XmStringCharSet
charset
;
XmStringDirection
dir_r_to_l
;
Boolean
sep
;
if
(
ar_value
==
0
)
{
strcpy
(
t_buffer
,
""
);
return
;
}
XmStringInitContext
(
&
context
,
ar_value
);
if
(
XmStringGetNextSegment
(
context
,
&
first_seg
,
&
charset
,
&
dir_r_to_l
,
&
sep
)
!=
TRUE
)
{
*
first_seg
=
0
;
}
else
{
strcpy
(
t_buffer
,
first_seg
);
XtFree
(
first_seg
);
#if 0
/* I don't think that this should be freed, ML 950120 */
XtFree (charset);
#endif
}
XmStringFreeContext
(
context
);
}
#endif
...
...
src/lib/co/src/co_wow.h
View file @
485d3e92
...
...
@@ -8,6 +8,8 @@
<Description>. */
#include <Xm/Xm.h>
typedef
enum
{
wow_eFileSelType_All
,
wow_eFileSelType_Dbs
,
...
...
@@ -67,6 +69,9 @@ void wow_CreateFileSelDia( Widget parent_wid,
void
(
*
file_selected_cb
)(
void
*
,
char
*
,
wow_eFileSelType
),
wow_eFileSelType
file_type
);
void
wow_GetLabel
(
Widget
w
,
char
*
label
);
void
wow_GetCSText
(
XmString
ar_value
,
char
*
t_buffer
);
#endif
...
...
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