static void maintainr_projectbox_init (MaintainrProjectbox *item) { GtkWidget *mainbox; item->priv = MAINTAINR_PROJECTBOX_GET_PRIVATE (item); gtk_container_set_border_width (GTK_CONTAINER (item), 10); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (item), FALSE); mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_notebook_append_page (GTK_NOTEBOOK (item), mainbox, NULL); gtk_box_pack_start (GTK_BOX (mainbox), do_head (item), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (mainbox), do_todos (item), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (mainbox), do_buttons (item), FALSE, FALSE, 0); gtk_notebook_append_page (GTK_NOTEBOOK (item), do_config (item), NULL); }
int main() { tranzport_t *z; uint8_t status; uint32_t buttons; uint8_t datawheel; int val; z = open_tranzport(); do_lcd(z); for(;;) { do_lcd(z); lights_on(z); do_lcd2(z); lights_off(z); // val = tranzport_read(z, &status, &buttons, &datawheel, 60000); val = -1; if (val < 0) continue; if (status == STATUS_OFFLINE) { printf("offline: "); continue; } if (status == STATUS_ONLINE) { printf("online: "); do_lcd(z); } do_lights(z, buttons); do_buttons(z, buttons, datawheel); } close_tranzport(z); return 0; }
void TModalDlg::do_layout() { Layout lo(this); layout(lo); do_buttons(lo); }