Changeset 210 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Mar 3, 1999, 7:32:48 PM (27 years ago)
Author:
ercodmgr
Message:

Positionnement fenetres, nouvelles commandes (piapp), Gestion fenetre des options Histo-2D Reza 03/03/99

Location:
trunk/SophyaPI/PIext
Files:
4 edited

Legend:

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

    r208 r210  
    139139  cout << "help  shelp  exec  set  listvars  traceon  traceoff \n";
    140140  cout << "timingon  timingoff  shell \n";
    141   cout << "link  call    zone  gratt  stacknext \n" ;
     141  cout << "link  call    zone  grwin  gratt  stacknext \n" ;
    142142  cout << "openppf  saveall  listobjs openfits savefits \n";
    143143  cout << "print rename  del delobjs \n";
     
    156156  cout << "traceon/off  --  timingon/off  --  shell cmdline\n";
    157157  cout << "link fnameso f1 [f2 f3]  --   call userf [arg1 arg2 ...]\n";
    158   cout << "zone nx ny  --  gratt attributes_list  --  stacknext \n";
    159   cout << "openfits file -- openppf file -- saveall file -- listobjs --\n";
     158  cout << "zone nx ny -- newwin nx ny -- gratt attributes_list -- stacknext \n";
     159  cout << "openppf file -- saveall file -- listobjs \n";
     160  cout << "openfits file -- savefits nomobj file \n";
    160161  cout << "print nomobj -- rename nomobj nomnew -- del nomobj -- delobjs pattern (*,?) \n";
    161162  cout << "newh1d nomh xmin xmax nbin  --  newh2d nomh xmin xmax nbinx ymin ymax nbiny\n";
     
    224225  nx = ny = 1;
    225226  nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
    226   mObjMgr->SetGraphicWinZone(nx, ny);
     227  mObjMgr->SetGraphicWinZone(nx, ny, false);
     228  } 
     229else if (kw == "newwin") {
     230  if (tokens.size() < 2) { cout << "PIACmd::Do() Usage: newwin nx ny" << endl;  return(0); }
     231  int nx, ny;
     232  nx = ny = 1;
     233  nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
     234  mObjMgr->SetGraphicWinZone(nx, ny, true);
    227235  } 
    228236else if (kw == "gratt") {
  • trunk/SophyaPI/PIext/pihisto2d.cc

    r205 r210  
    442442
    443443//++
     444void PIH2DWdg::ActivateSpecializedControls()
     445//      Pour activer les contrôles spécifiques pour l'affichage Histo-2D       
     446//--
     447{
     448h2dWinArg->SetPIH2DWdg(this);
     449h2dWinArg->SetMsgParent((PIMsgHandler*)this);
     450if(!h2dWinArg->Visible()) h2dWinArg->Show();
     451}
     452
     453//++
    444454void PIH2DWdg::But3Press(int x, int y)
    445455//
     
    451461//--
    452462{
    453 h2dWinArg->SetPIH2DWdg(this);
    454 h2dWinArg->SetMsgParent((PIMsgHandler*)this);
    455 if(!h2dWinArg->Visible()) h2dWinArg->Show();
     463ActivateSpecializedControls();
    456464if(dbg) printf("PIH2DWdg::But3Press(%d,%d) h2dWinArg=%lx\n"
    457465              ,x,y,(long)h2dWinArg);
  • trunk/SophyaPI/PIext/pihisto2d.h

    r205 r210  
     1// This may look like C code, but it is really -*- C++ -*-
     2// Module PIext :   PIHisto2D PIH2DWdg
     3// Traceur Histo-2D    C. Magneville 97-98
     4// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
     5
    16#ifndef PIHISTO2D_H
    27#define PIHISTO2D_H
     
    6570
    6671  virtual string     GetClickText(double x, double y);
     72  virtual void       ActivateSpecializedControls();   // Pour activer des controles specifiques
    6773  virtual void       But3Press(int x, int y);
    6874
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r205 r210  
    515515char buff[64];
    516516mWId++;
    517 sprintf(buff, "PI-GraphicWin (%d)",mWId);
    518 PIZoneWindow* win = new PIZoneWindow(this,  buff, PIWK_normal, nx, ny, sx, sy, 0, 0);
     517int px, py;
     518MainWin()->GetScreenPos(px, py);
     519sprintf(buff, "PI-GraphicWin (%d)",mWId);
     520PIZoneWindow* win = new PIZoneWindow(this,  buff, PIWK_normal, nx, ny, sx, sy, px+MainWin()->XSize()+30, 0);
    519521win->SetUserData(NULL, ny*10+nx);  // UserFlag= nY*10 + nX 
    520522mWList[mWId*10+1] = (PIWindow*)win;
     
    531533char buff[64];
    532534mWId++;
     535int px, py;
     536MainWin()->GetScreenPos(px, py);
    533537sprintf(buff, "PI-StackWin (%d)",mWId);
    534 PIStackWindow* win = new PIStackWindow(this,  buff, PIWK_normal, sx, sy, 0, 0);
     538PIStackWindow* win = new PIStackWindow(this,  buff, PIWK_normal, sx, sy, px+MainWin()->XSize()+30, 100);
    535539win->SetUserData(NULL, 9999);  // UserFlag= 9999
    536540mWList[mWId*10+2] = (PIWindow*)win;
     
    576580  default :      // Fenetre ordinaire
    577581    {
     582    int pwx, pwy;
     583    MainWin()->GetScreenPos(pwx, pwy);
    578584    if ( (sx < 50) && (sy < 50) )   sx = sy = 300+mFgScSz*100;
    579     rw = new PIWindow(this,  nom, PIWK_normal, sx, sy, 0, 0);
     585    rw = new PIWindow(this,  nom, PIWK_normal, sx, sy, pwx+MainWin()->XSize()+30, 300);
    580586    rw->SetUserData(NULL, 0);  // UserFlag= 0
    581587    mWId++;
Note: See TracChangeset for help on using the changeset viewer.