Exemple #1
0
 public static void Rcvd(TabBox tabBox, GfsCtx ctx, GfoMsg m) {
   TabPnlItm itm = (TabPnlItm) m.CastObj("v");
   GfuiBtn btn = GfuiBtn_.as_(tabBox.BtnBox().SubElems().Get_by(itm.Key()));
   if (btn
       != null) // HACK: check needed b/c Gfds will raise UpdateCaption event before Creating tab
   btn.Text_(itm.Name()).TipText_(itm.Name());
 }
Exemple #2
0
  @gplx.Internal
  protected void MoveTab(GfuiBtn curBtn, int delta) {
    TabPnlItm curItm = tabBox.Mgr().Get_by(curBtn.Key_of_GfuiElem());
    int curIdx = curItm.Idx();
    int newIdx = TabBox_.Cycle(delta > 0, curIdx, tabBox.Mgr().Count());

    tabBox.Mgr().Move_to(curIdx, newIdx);
    tabBox
        .Mgr()
        .Reorder(
            0); // reorder all; exchanging curIdx for newIdx does not work when going from last to
                // first (17 -> 0, but 0 -> 1)
    tabBox.PnlBox().SubElems().Move_to(curIdx, newIdx);
    TabBtnAreaMgr.Move_to(tabBox, curIdx, newIdx);
    TabBoxEvt_orderChanged.Publish(tabBox, curIdx, newIdx);
  }
Exemple #3
0
 public static void Rcvd(Object sender, TabBox tabBox) {
   GfuiBtn btn = (GfuiBtn) sender;
   String key = btn.Key_of_GfuiElem();
   TabBoxMgr mgr = tabBox.Mgr();
   mgr.Select(mgr.Get_by(key));
 }