Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for tucniak/cuchar/cc_user.c between version 1.2 and 1.3

version 1.2, 2005/11/27 20:14:50 version 1.3, 2005/11/29 18:46:32
Line 1 
Line 1 
 /*  /*
   Name: lc_user.c    Name: cc_user.c
   Author: Michal Sudolsky    Author: Michal Sudolsky <michals@sulysoft.com>
   Date: 22.09.2005 15:13    Date: 22.09.2005 15:13
 */  */
 // modified by Juraj Kolesar <koli@koli.sk>  // modified by Juraj Kolesar <koli@koli.sk>
Line 963  void set_pos(WIN *win,long pos)
Line 963  void set_pos(WIN *win,long pos)
     SCROLL *vscroll=&win->extra->list.vscroll->extra->scroll;      SCROLL *vscroll=&win->extra->list.vscroll->extra->scroll;
     if(pos<vscroll->pos)vscroll->pos=pos;      if(pos<vscroll->pos)vscroll->pos=pos;
     if(pos-win->vy+3>vscroll->pos)vscroll->pos=pos-win->vy+3;      if(pos-win->vy+3>vscroll->pos)vscroll->pos=pos-win->vy+3;
       long actline=win->extra->list.activeline;
     win->extra->list.activeline=pos;      win->extra->list.activeline=pos;
       setlistactiveitem(&win->extra->list,actline,win->extra->list.activeline);
     redraw();      redraw();
     if(win->extra->list.change!=NULL)win->extra->list.change(win);      if(win->extra->list.change!=NULL)win->extra->list.change(win);
   }    }
Line 1011  void set_list(WIN *win,GList *list)
Line 1013  void set_list(WIN *win,GList *list)
   {    {
     LIST *llist=&win->extra->list;      LIST *llist=&win->extra->list;
     llist->lines=list;      llist->lines=list;
     if((llist->combotyp==CT_TABLE)&&(llist->lines!=NULL))      setuplistparams(win);
     {  
       long i;  
       if(llist->lencells!=NULL)g_slist_free(llist->lencells);  
       for(i=0;i<g_slist_length((GSList*)llist->lines->data);i++)  
         llist->lencells=g_slist_append(llist->lencells,NULL);  
     }  
     redraw();      redraw();
   }    }
   else if(win->extra->type==TP_COMBO)    else if(win->extra->type==TP_COMBO)
Line 1517  WIN *create_win(WIN *parent,long x,long
Line 1513  WIN *create_win(WIN *parent,long x,long
     list->exvscroll=EX_NONE;      list->exvscroll=EX_NONE;
     list->exhscroll=EX_NONE;      list->exhscroll=EX_NONE;
     list->lencells=NULL;      list->lencells=NULL;
       list->numlines=0;
       list->maxitemlen=0;
       list->activeitem=NULL;
     scroll.vert=true;      scroll.vert=true;
     list->vscroll=create_win(ne,ne->vx-1,1,1,ne->vy-2,(PUNION*)&scroll,0,NULL);      list->vscroll=create_win(ne,ne->vx-1,1,1,ne->vy-2,(PUNION*)&scroll,0,NULL);
     scroll.vert=false;      scroll.vert=false;
Line 1543  WIN *create_win(WIN *parent,long x,long
Line 1542  WIN *create_win(WIN *parent,long x,long
     x=-1;y=ne->vy;      x=-1;y=ne->vy;
     list.type=TP_LIST;      list.type=TP_LIST;
     list.activeline=0;      list.activeline=0;
       list.lines=NULL;
     list.combotyp=CT_COMBO;      list.combotyp=CT_COMBO;
     list.change=NULL;      list.change=NULL;
     list.dblclk=combodblclkproc;      list.dblclk=combodblclkproc;
     combo->pushed=SC_UP;      combo->pushed=SC_UP;
     combo->scroll=0;      combo->scroll=0;
     combo->list=create_win(ne,x,y,ne->vx+2,ne->extra->combo.lstvy,(PUNION*)&list,0,NULL);      combo->list=create_win(ne,x,y,ne->vx+2,ne->extra->combo.lstvy,(PUNION*)&list,ST_TOP_WIN,NULL);
     if((style&ST_CO_WITH_EDIT)==ST_CO_WITH_EDIT)      if((style&ST_CO_WITH_EDIT)==ST_CO_WITH_EDIT)
     {      {
       PEDIT edit;        PEDIT edit;
Line 1578  WIN *create_win(WIN *parent,long x,long
Line 1578  WIN *create_win(WIN *parent,long x,long
     {      {
       PUNION fade;        PUNION fade;
       fade.type=TP_FADE;        fade.type=TP_FADE;
         ne->style|=ST_TOP_WIN;
       menu->hfade=create_win(ne,2,ne->vy,ne->vx,1,(PUNION*)&fade,ST_VISIBLE,NULL);        menu->hfade=create_win(ne,2,ne->vy,ne->vx,1,(PUNION*)&fade,ST_VISIBLE,NULL);
       menu->vfade=create_win(ne,ne->vx>1?ne->vx:ne->vx+1,1,ne->vx>1?2:1,ne->vy-1,(PUNION*)&fade,ST_VISIBLE,NULL);        menu->vfade=create_win(ne,ne->vx>1?ne->vx:ne->vx+1,1,ne->vx>1?2:1,ne->vy-1,(PUNION*)&fade,ST_VISIBLE,NULL);
     }      }
Line 1726  void message_pump()
Line 1727  void message_pump()
     mainwin.vx=screenx;      mainwin.vx=screenx;
     mainwin.vy=screeny;      mainwin.vy=screeny;
     mainwin.windata=realloc(mainwin.windata,screenx*screeny*sizeof(attr_t));      mainwin.windata=realloc(mainwin.windata,screenx*screeny*sizeof(attr_t));
       cmap=realloc(cmap,screenx*screeny*sizeof(CMAP));
     if(resizescreen!=NULL)resizescreen(NULL);      if(resizescreen!=NULL)resizescreen(NULL);
     redraw();      redraw();
   }    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top