Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
On get, the arguments remain the same, the array passed in gets filled in by the PANEL_LIST
package. The return value is the number of rows that were successfully filled in.
Example D-3 shows a portion of a program which uses the new PANEL_LIST insertion
method.
Example D-3. Program that adds values to a panel list
/*
* Demonstrate the use of the PANEL_LIST_ROW_VALUES attribute
*/
#include <stdio.h>
#include <xview/xview.h>
#include <xview/font.h>
#include <xview/panel.h>
static Attr_attribute MY_KEY;
static void my_clear_proc();
static void my_load_proc();
static void my_print_proc();
typedef struct {
Frame frame;
Panel_list_item list;
Xv_font font;
} My_ui;
void
main ( argc, argv )
int argc;
char **argv;
{
Panel panel;
My_ui ui;
(void) xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);
MY_KEY = xv_unique_key();
ui.frame = xv_create ( XV_NULL, FRAME,
XV_LABEL, "New Load",
FRAME_SHOW_FOOTER, TRUE,
NULL );
panel = xv_create ( ui.frame, PANEL, NULL );
(void) xv_create ( panel, PANEL_BUTTON,
PANEL_LABEL_STRING, "Load",
PANEL_NOTIFY_PROC, my_load_proc,
XV_KEY_DATA, MY_KEY, &ui,
NULL );
(void) xv_create ( panel, PANEL_BUTTON,
PANEL_LABEL_STRING, "Clear",
692 Version 3.2 and the File Chooser
Example D-3. Program that adds values to a panel list (continued)
PANEL_NOTIFY_PROC, my_clear_proc,
XV_KEY_DATA, MY_KEY, &ui,
NULL );
(void)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873