GTK+ and IC-7410 (2)

gtk6

First you need to arrange buttons, each of which has some functionality.

% grep table myprog.c

GtkWidget *table;
table = gtk_table_new (4, 8, TRUE);
gtk_container_add (GTK_CONTAINER (window), table);
gtk_table_attach_defaults (GTK_TABLE(table), button, 0, 2, 0, 3);
gtk_table_attach_defaults (GTK_TABLE(table), button, 4, 5, 1, 3);
gtk_table_attach_defaults (GTK_TABLE(table), button, 6, 7, 2, 3);
gtk_table_attach_defaults (GTK_TABLE(table), button, 1, 6, 4, 5);
gtk_widget_show (table);

Here I used GtkTable to arrange the buttons two dimensionally.

gtk5

You can map an image onto a button to give better impressions.

% ./myprog

CW was pressed
CW-REVERSE was pressed
SSB was pressed

In callback functions, only a g_print line is currently included, which should be replaced to send a command to IC-7410.

Leave a Reply

Your email address will not be published. Required fields are marked *