void CTripleLinkageOpt::OnLButtonDown(const CPoint& point) { int nRet = GetFocusThumb(point); if(nRet != -1) // begin to drag? { m_nFocusThumb = nRet; if( m_nFocusThumb == FOCUS_ON_TOPLEFT || m_nFocusThumb == FOCUS_ON_RIGHTBTM) //single button模式 两个从属的不能拖动 { return; } m_bStartDraging = TRUE; //HWND hwnd = SetCapture(AfxGetApp()->GetMainWnd()->); } else { if( m_nFocusThumb == FOCUS_ON_TOPLEFT || m_nFocusThumb == FOCUS_ON_RIGHTBTM) //single button模式 两个从属的不能拖动 { return; } MovePage(point); ReCalcChannelRect(); } }
/*********************************************************************** * * Procedure: * list_new_page - displays packet contents to stderr * ***********************************************************************/ void list_new_page(unsigned long *body) { Scr.Vx = (long)body[0]; Scr.Vy = (long)body[1]; Scr.CurrentDesk = (long)body[2]; MovePage(); MoveStickyWindows(); Hilight(FocusWin,OFF); Hilight(FocusWin,ON); }
/* * SelectPageDown - update selected region, moving one page down */ vi_rc SelectPageDown( void ) { if( !EditFlags.Dragging ) { startSelectedRegion( EditFlags.LineBased ); if( EditFlags.LineBased ) { return ERR_NO_ERR; } } return( MovePage( 1, 1, TRUE ) ); } /* SelectPageDown */
/* * SelectPageUp - update selected region, moving one page up */ vi_rc SelectPageUp( void ) { if( !EditFlags.Dragging ) { startSelectedRegion( EditFlags.LineBased ); if( EditFlags.LineBased ) { return ERR_NO_ERR; } } return( MovePage( -1, 1, true ) ); } /* SelectPageUp */
/*********************************************************************** * * Procedure: * list_new_desk - displays packet contents to stderr * ***********************************************************************/ void list_new_desk(unsigned long *body) { int oldDesk; oldDesk = Scr.CurrentDesk; Scr.CurrentDesk = (long)body[0]; MovePage(); DrawGrid(oldDesk - desk1,1); DrawGrid(Scr.CurrentDesk - desk1,1); MoveStickyWindows(); Hilight(FocusWin,OFF); Hilight(FocusWin,ON); }
void CMultiThumbOpt::OnLButtonDown(const CPoint& point) { int nRet = GetFocusThumb(point); if(nRet != -1) // begin to drag? { m_nFocusThumb = nRet; m_bStartDraging = TRUE; //HWND hwnd = SetCapture(AfxGetApp()->GetMainWnd()->); } else { MovePage(point); ReCalcChannelRect(); } }
/* * moveHalfPage - display half a page */ static vi_rc moveHalfPage( int dir ) { int ople; vi_rc rc; long repcnt; int ln; ople = EditVars.PageLinesExposed; repcnt = GetRepeatCount(); if( repcnt > 1 ) { ln = WindowAuxInfo( CurrentWindow, WIND_INFO_TEXT_LINES ) - repcnt; if( ln < 1 ) { ln = 1; } HalfPageLines = ln; } EditVars.PageLinesExposed = HalfPageLines; rc = MovePage( dir, 1, false ); EditVars.PageLinesExposed = ople; return( rc ); } /* moveHalfPage */
/*********************************************************************** * * Procedure: * list_new_page - displays packet contents to stderr * ***********************************************************************/ void list_new_page(unsigned long *body) { Scr.Vx = body[0]; Scr.Vy = body[1]; if (Scr.CurrentDesk != body[2]) { /* first handle the new desk */ body[0] = body[2]; list_new_desk(body); } if((Scr.VxMax != body[3])||(Scr.VyMax != body[4])) { Scr.VxMax = body[3]; Scr.VyMax = body[4]; Scr.VxPages = Scr.VxMax / Scr.MyDisplayWidth; Scr.VyPages = Scr.VyMax / Scr.MyDisplayHeight; Scr.VWidth = Scr.VxMax + Scr.MyDisplayWidth; Scr.VHeight = Scr.VyMax + Scr.MyDisplayHeight; ReConfigure(); } MovePage(False); MoveStickyWindows(); Hilight(FocusWin,True); }
void LineEdit::MovePageDown(bool sel) { MovePage(1, sel); }
void LineEdit::MovePageUp(bool sel) { MovePage(-1, sel); }
/*********************************************************************** * * Procedure: * list_new_desk - displays packet contents to stderr * ***********************************************************************/ void list_new_desk(unsigned long *body) { int oldDesk; int change_cs = -1; int change_ballooncs = -1; int change_highcs = -1; oldDesk = Scr.CurrentDesk; Scr.CurrentDesk = (long)body[0]; if (fAlwaysCurrentDesk && oldDesk != Scr.CurrentDesk) { PagerWindow *t; PagerStringList *item; char line[100]; desk1 = Scr.CurrentDesk; desk2 = Scr.CurrentDesk; for (t = Start; t != NULL; t = t->next) { if (t->desk == oldDesk || t->desk == Scr.CurrentDesk) ChangeDeskForWindow(t, t->desk); } item = FindDeskStrings(Scr.CurrentDesk); if (Desks[0].label != NULL) { free(Desks[0].label); Desks[0].label = NULL; } if (item->next != NULL && item->next->label != NULL) { CopyString(&Desks[0].label, item->next->label); } else { sprintf(line, "Desk %d", desk1); CopyString(&Desks[0].label, line); } XStoreName(dpy, Scr.Pager_w, Desks[0].label); XSetIconName(dpy, Scr.Pager_w, Desks[0].label); if (Desks[0].bgPixmap != NULL) { DestroyPicture(dpy, Desks[0].bgPixmap); Desks[0].bgPixmap = NULL; } if (Desks[0].Dcolor != NULL) { free (Desks[0].Dcolor); Desks[0].Dcolor = NULL; } if (item->next != NULL) { change_cs = item->next->colorset; change_ballooncs = item->next->ballooncolorset; change_highcs = item->next->highcolorset; } if (change_cs < 0) { change_cs = globalcolorset; } Desks[0].colorset = change_cs; if (change_cs > -1) { /* use our colour set if we have one */ change_colorset(change_cs); } else if (item->next != NULL && item->next->bgPixmap != NULL) { Desks[0].bgPixmap = item->next->bgPixmap; Desks[0].bgPixmap->count++; XSetWindowBackgroundPixmap(dpy, Desks[0].w, Desks[0].bgPixmap->picture); } else if (item->next != NULL && item->next->Dcolor != NULL) { CopyString(&Desks[0].Dcolor, item->next->Dcolor); XSetWindowBackground(dpy, Desks[0].w, GetColor(Desks[0].Dcolor)); } else if (PixmapBack != NULL) { Desks[0].bgPixmap = PixmapBack; Desks[0].bgPixmap->count++; XSetWindowBackgroundPixmap(dpy, Desks[0].w, Desks[0].bgPixmap->picture); } else { CopyString(&Desks[0].Dcolor, PagerBack); XSetWindowBackground(dpy, Desks[0].w, GetColor(Desks[0].Dcolor)); } if (item->next != NULL && item->next->Dcolor != NULL) { CopyString(&Desks[0].Dcolor, item->next->Dcolor); } else { CopyString(&Desks[0].Dcolor, PagerBack); } if (change_cs < 0 || Colorset[change_cs].pixmap != ParentRelative) XSetWindowBackground(dpy, Desks[0].title_w, GetColor(Desks[0].Dcolor)); /* update the colour sets for the desk */ if (change_ballooncs < 0) { change_ballooncs = globalballooncolorset; } Desks[0].ballooncolorset = change_ballooncs; if (change_highcs < 0) { change_highcs = globalhighcolorset; } Desks[0].highcolorset = change_highcs; if (change_ballooncs > -1 && change_ballooncs != change_cs) { change_colorset(change_ballooncs); } if (change_highcs > -1 && change_highcs != change_cs && change_highcs != change_ballooncs) { change_colorset(change_highcs); } XClearWindow(dpy, Desks[0].w); XClearWindow(dpy, Desks[0].title_w); } /* if (fAlwaysCurrentDesk && oldDesk != Scr.CurrentDesk) */ else if (!fAlwaysCurrentDesk) { int i; char *name; char line[100]; i = Scr.CurrentDesk - desk1; if (i >= 0 && i < ndesks && Desks[i].label != NULL) { name = Desks[i].label; } else { sprintf(line, "Desk %d", Scr.CurrentDesk); name = &(line[0]); } XStoreName(dpy, Scr.Pager_w, name); XSetIconName(dpy, Scr.Pager_w, name); } MovePage(True); DrawGrid(oldDesk - desk1,1); DrawGrid(Scr.CurrentDesk - desk1,1); MoveStickyWindows(); /* Hilight(FocusWin,False); */ Hilight(FocusWin,True); }
vi_rc MovePageUp( void ) { return( MovePage( -1, GetRepeatCount(), false ) ); }
vi_rc MovePageDown( void ) { return( MovePage( 1, GetRepeatCount(), false ) ); }