Exemple #1
0
g_error submenuitem_install(struct widget *self) {
  g_error e;

  /* Start with a button */
  e = button_install(self);
  errorcheck;

  /* Customize */
  widget_set(self, PG_WP_THOBJ_BUTTON,              PGTH_O_SUBMENUITEM);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON,           PGTH_O_SUBMENUITEM_HILIGHT);
  widget_set(self, PG_WP_THOBJ_BUTTON_HILIGHT,      PGTH_O_SUBMENUITEM_HILIGHT);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON_NOHILIGHT, PGTH_O_SUBMENUITEM_HILIGHT);

  /* We need extra events */
  widget_set(self,PG_WP_EXTDEVENTS,PG_EXEV_PNTR_UP | PG_EXEV_NOCLICK);

#ifdef CONFIG_SUBMENU_NAVIGATION
  /* TTH: Register submenuitem_trigger callback */
  self->def->trigger = submenuitem_trigger;
#endif /* CONFIG_SUBMENU_NAVIGATION */
  
  /* Stack vertically */
  widget_set(self,PG_WP_SIDE,PG_S_TOP);

  return success;
}
Exemple #2
0
g_error flatbutton_install(struct widget *self) {
  g_error e;
  e = button_install(self);
  errorcheck;

  /* Customize */
  widget_set(self, PG_WP_THOBJ_BUTTON,              PGTH_O_FLATBUTTON);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON,           PGTH_O_FLATBUTTON_ON);
  widget_set(self, PG_WP_THOBJ_BUTTON_HILIGHT,      PGTH_O_FLATBUTTON_HILIGHT);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON_NOHILIGHT, PGTH_O_FLATBUTTON_ON);

  return success;
}
Exemple #3
0
g_error checkbox_install(struct widget *self) {
  g_error e;

  /* Start with a button */
  e = button_install(self);
  errorcheck;

  /* Customize */
  widget_set(self, PG_WP_THOBJ_BUTTON,              PGTH_O_CHECKBOX);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON,           PGTH_O_CHECKBOX_ON);
  widget_set(self, PG_WP_THOBJ_BUTTON_HILIGHT,      PGTH_O_CHECKBOX_HILIGHT);
  widget_set(self, PG_WP_THOBJ_BUTTON_ON_NOHILIGHT, PGTH_O_CHECKBOX_ON_NOHILIGHT);

  /* Use alternate click event handling to toggle */
  widget_set(self,PG_WP_EXTDEVENTS,PG_EXEV_TOGGLE);

  /* Stack vertically */
  widget_set(self,PG_WP_SIDE,PG_S_TOP);

  return success;
}
Exemple #4
0
g_error label_install(struct widget *self) {
  g_error e;

  /* Start with a button */
  e = button_install(self);
  errorcheck;

  /* Customize */
  widget_set(self, PG_WP_THOBJ_BUTTON, PGTH_O_LABEL);

  /* Make it inert */
  widget_set(self,PG_WP_EXTDEVENTS,PG_EXEV_NO_HOTSPOT);
  widget_set(self,PG_WP_TRIGGERMASK,0);

  /* Stack vertically */
  widget_set(self,PG_WP_SIDE,PG_S_TOP);

  /* Transparent by default */
  widget_set(self,PG_WP_TRANSPARENT,1);

  return success;
}