Changeset 685 in Sophya for trunk/SophyaPI/PIext/pisiadw.cc


Ignore:
Timestamp:
Dec 13, 1999, 12:19:25 AM (26 years ago)
Author:
ercodmgr
Message:

FileChooser multiples ds PIStdImgApp, Correction Ndisp ds PINTuple, Fenetre NObjMgrWind non bloquant desormais ds piapp - Reza 12/12/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pisiadw.cc

    r584 r685  
    2323/* --Methode-- */
    2424ObjMgrWind::ObjMgrWind(PIStdImgApp *par)
    25 : PIWindow((PIMsgHandler *)par, "objmgr", PIWK_dialog,
     25: PIWindow((PIMsgHandler *)par, "objmgr", PIWK_normal,
    2626           400, 300, 250, 250)
    2727{
     
    4545int py = spy;
    4646int px = 2*spx+3*bsx;
    47 mBut[0] = new PIButton(this, "SetCurDir", 10, bsx, bsy, px, py);   py += (bsy+spy);
     47mBut[0] = new PIButton(this, "SetCurObj", 10, bsx, bsy, px, py);   py += (bsy+spy);
    4848mBut[1] = new PIButton(this, "Display", 20, bsx, bsy, px, py);   py += (bsy+spy);
    4949mBut[2] = new PIButton(this, "Print",   30, bsx, bsy, px, py);   py += (bsy+spy);
     
    7070void ObjMgrWind::Show()
    7171{
    72 dap->SetBlocked();
     72// dap->SetBlocked();  Ce n'est plus necessaire - Reza 11/12/99
    7373string cdir;
    7474dap->ObjMgr()->GetCurrentDir(cdir);
     
    8080}
    8181
     82
    8283/* --Methode-- */
    8384void ObjMgrWind::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/)
     
    9596  return;
    9697  }
    97 else if (msg == 10) {
     98/*
     99 else if (msg == 10) {
    98100  string cdir = dirlist->GetValueStr();
    99101  dap->ObjMgr()->SetCurrentDir(cdir);
    100102  return;
    101103  }
     104*/
    102105
    103106string nom = "";
    104 if ( (msg == 20) || (msg == 30) || (msg == 40) || (msg == 50) ) {
    105   string sel = objlist->GetSelectionStr();
     107string sel = "";
     108if ( (msg == 10) || (msg == 20) || (msg == 30) || (msg == 40) || (msg == 50) ) {
     109  sel = objlist->GetSelectionStr();
    106110  //  size_t p = sel.find_first_not_of(" \t");
    107111  //  if (p<0) p = 0;
     
    114118NamedObjMgr* om = dap->ObjMgr();
    115119if (om == NULL)  return;
     120if (sel.length() < 1)  return;
    116121if (nom.length() < 1)  return;
    117122
    118123switch (msg)
    119124  {
     125  case 10:
     126    {
     127    string cmd = "set cobj " + nom ;
     128    cout << " Setting current object ($cobj) to " << nom << endl;
     129    dap->CmdInterpreter()->Interpret(cmd);
     130    }
     131    break;
    120132  case 20:
    121133    om->DisplayObj(nom);
     
    129141  case 50:
    130142    om->DelObj(nom);
    131     objlist->DeleteItemMsg(objlist->GetSelection());
     143    //    objlist->DeleteItemMsg(objlist->GetSelection());
    132144    //    dap->ObjMgr()->UpdateObjMgrWindow(dirlist->GetValue()-30000);
    133145    break;
     
    141153}
    142154
     155/* --Methode-- */
     156void ObjMgrWind::UpdateList(int did)
     157{
     158if (!Visible()) return;
     159if (did != (dirlist->GetValue()-30000) )  return;
     160dap->ObjMgr()->UpdateObjMgrWindow(did);
     161return;
     162}
     163
     164/* --Methode-- */
     165void ObjMgrWind::AddObjList(int did, const char * objn, int oid)
     166{
     167if (!Visible()) return;
     168if (did != (dirlist->GetValue()-30000) )  return;
     169mNitem++;  objlist->AppendItem(objn, oid);
     170}
     171
     172/* --Methode-- */
     173void ObjMgrWind::DelObjList(int did, int oid)
     174{
     175if (!Visible()) return;
     176//DBG printf("DBG-DelObjList %d , %d , (%d) \n", did, dirlist->GetValue()-30000, oid);
     177if (did != (dirlist->GetValue()-30000) )  return;
     178objlist->DeleteItemMsg(oid);
     179}
    143180
    144181/* ........................................................... */
Note: See TracChangeset for help on using the changeset viewer.