亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fl_browser_.cxx

?? flnx 0.17 是做嵌入linux gui 必備工具箱
?? CXX
?? 第 1 頁 / 共 2 頁
字號:
//// "$Id: Fl_Browser_.cxx,v 1.1.1.1 2003/08/07 21:18:39 jasonk Exp $"//// Base Browser widget class for the Fast Light Tool Kit (FLTK).//// Copyright 1998-1999 by Bill Spitzak and others.//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Library General Public// License as published by the Free Software Foundation; either// version 2 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU// Library General Public License for more details.//// You should have received a copy of the GNU Library General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307// USA.//// Please report all bugs and problems to "fltk-bugs@easysw.com".//#include <FL/Fl.H>#include <FL/Fl_Widget.H>#include <FL/Fl_Browser_.H>#include <FL/fl_draw.H>// This is the base class for browsers.  To be useful it must be// subclassed and several virtual functions defined.  The// Forms-compatable browser and the file chooser's browser are// subclassed off of this.// Yes, I know this should be a template...// This has been designed so that the subclass has complete control// over the storage of the data, although because next() and prev()// functions are used to index, it works best as a linked list or as a// large block of characters in which the line breaks must be searched// for.// A great deal of work has been done so that the "height" of a data// object does not need to be determined until it is drawn.  This was// done for the file chooser, because the height requires doing stat()// to see if the file is a directory, which can be annoyingly slow// over the network./* redraw bits:   1 = redraw children (the scrollbar)   2 = redraw one or two items   4 = redraw all items*/static void scrollbar_callback(Fl_Widget* s, void*) {  ((Fl_Browser_*)(s->parent()))->position(int(((Fl_Scrollbar*)s)->value()));}static void hscrollbar_callback(Fl_Widget* s, void*) {  ((Fl_Browser_*)(s->parent()))->hposition(int(((Fl_Scrollbar*)s)->value()));}int Fl_Browser_::scrollbar_width_ = 17;// return where to draw the actual box:void Fl_Browser_::bbox(int& X, int& Y, int& W, int& H) const {  Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;  X = x()+Fl::box_dx(b);  Y = y()+Fl::box_dy(b);  W = w()-Fl::box_dw(b);  H = h()-Fl::box_dh(b);  if (scrollbar.visible()) {    W -= scrollbar_width_;    if (scrollbar.align() & FL_ALIGN_LEFT) X += scrollbar_width_;  }  if (W < 0) W = 0;  if (hscrollbar.visible()) {    H -= scrollbar_width_;    if (scrollbar.align() & FL_ALIGN_TOP) Y += scrollbar_width_;  }  if (H < 0) H = 0;}int Fl_Browser_::leftedge() const {  int X, Y, W, H; bbox(X, Y, W, H);  return X;}// the scrollbars are resized & placed by draw(), since each one's size// depends on whether the other is visible or not.  This skips over// Fl_Group::resize since it moves the scrollbars uselessly.void Fl_Browser_::resize(int X, int Y, int W, int H) {  Fl_Widget::resize(X, Y, W, H);}// Cause minimal update to redraw the given item:void Fl_Browser_::redraw_line(void* l) {  if (!redraw1 || redraw1 == l) {redraw1 = l; damage(FL_DAMAGE_EXPOSE);}  else if (!redraw2 || redraw2 == l) {redraw2 = l; damage(FL_DAMAGE_EXPOSE);}  else damage(FL_DAMAGE_SCROLL);}// Figure out top() based on position():void Fl_Browser_::update_top() {  if (!top_) top_ = item_first();  if (position_ != real_position_) {    void* l;    int ly;    int y = position_;    // start from either head or current position, whichever is closer:    if (!top_ || y <= (real_position_/2)) {      l = item_first();      ly = 0;    } else {      l = top_;      ly = real_position_-offset_;    }    if (!l) {      top_ = 0;      offset_ = 0;      real_position_ = 0;    } else {      int h = item_quick_height(l);      // step through list until we find line containing this point:      while (ly > y) {	void* l1 = item_prev(l);	if (!l1) {ly = 0; break;} // hit the top	l = l1;	h = item_quick_height(l);	ly -= h;      }      while ((ly+h) <= y) {	void* l1 = item_next(l);	if (!l1) {y = ly+h-1; break;}	l = l1;	ly += h;	h = item_quick_height(l);      }      // top item must *really* be visible, use slow height:      for (;;) {	h = item_height(l);	if ((ly+h) > y) break; // it is big enough to see	// go up to top of previous item:	void* l1 = item_prev(l);	if (!l1) {ly = y = 0; break;} // hit the top	l = l1; y = position_ = ly = ly-item_quick_height(l);      }      // use it:      top_ = l;      offset_ = y-ly;      real_position_ = y;    }    damage(FL_DAMAGE_SCROLL);  }}// Change position(), top() will update when update_top() is called// (probably by draw() or handle()):void Fl_Browser_::position(int y) {  if (y < 0) y = 0;  if (y == position_) return;  position_ = y;  if (y != real_position_) redraw_lines();}void Fl_Browser_::hposition(int x) {  if (x < 0) x = 0;  if (x == hposition_) return;  hposition_ = x;  if (x != real_hposition_) redraw_lines();}// Tell whether item is currently displayed:int Fl_Browser_::displayed(void* x) const {  int X, Y, W, H; bbox(X, Y, W, H);  int yy = H+offset_;  for (void* l = top_; l && yy > 0; l = item_next(l)) {    if (l == x) return 1;    yy -= item_height(l);  }  return 0;}// Insure this item is displayed:// Messy because we have no idea if it is before top or after bottom:void Fl_Browser_::display(void* x) {  update_top();  if (x == item_first()) {position(0); return;}  int X, Y, W, H; bbox(X, Y, W, H);  void* l = top_;  Y = -offset_;  // see if it is at the top or just above it:  if (l == x) {position(real_position_+Y); return;} // scroll up a bit  void* lp = item_prev(l);  if (lp == x) {position(real_position_+Y-item_quick_height(lp)); return;}  // search forward for it:  for (; l; l = item_next(l)) {    int h1 = item_quick_height(l);    if (l == x) {      if (Y <= H) { // it is visible or right at bottom	Y = Y+h1-H; // find where bottom edge is	if (Y > 0) position(real_position_+Y); // scroll down a bit      } else {	position(real_position_+Y-(H-h1)/2); // center it      }      return;    }    Y += h1;  }  // search backward for it, if found center it:  l = lp;  Y = -offset_;  for (; l; l = item_prev(l)) {    int h1 = item_quick_height(l);    Y -= h1;    if (l == x) {      if ((Y + h1) >= 0) position(real_position_+Y);      else position(real_position_+Y-(H-h1)/2);      return;    }  }}// redraw, has side effect of updating top and setting scrollbar:void Fl_Browser_::draw() {  int drawsquare = 0;  if (damage() & FL_DAMAGE_ALL) { // redraw the box if full redraw    Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;    draw_box(b, x(), y(), w(), h(), color());    drawsquare = 1;   }  update_top();  int full_width_ = full_width();  int full_height_ = full_height();  int X, Y, W, H; bbox(X, Y, W, H);  int dont_repeat = 0;J1:  // see if scrollbar needs to be switched on/off:  if ((has_scrollbar_ & VERTICAL) && (	(has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {    if (!scrollbar.visible()) {      scrollbar.set_visible();      drawsquare = 1;      bbox(X, Y, W, H);    }  } else {    top_ = item_first(); real_position_ = offset_ = 0;    if (scrollbar.visible()) {      scrollbar.clear_visible();      clear_damage(damage()|FL_DAMAGE_SCROLL);    }  }  if ((has_scrollbar_ & HORIZONTAL) && (	(has_scrollbar_ & ALWAYS_ON) || hposition_ || full_width_ > W)) {    if (!hscrollbar.visible()) {      hscrollbar.set_visible();      drawsquare = 1;      bbox(X, Y, W, H);    }  } else {    real_hposition_ = 0;    if (hscrollbar.visible()) {      hscrollbar.clear_visible();      clear_damage(damage()|FL_DAMAGE_SCROLL);    }  }  // Check the vertical scrollbar again, just in case it needs to be drawn  // because the horizontal one is drawn.  There should be a cleaner way  // to do this besides copying the same code...  if ((has_scrollbar_ & VERTICAL) && (	(has_scrollbar_ & ALWAYS_ON) || position_ || full_height_ > H)) {    if (!scrollbar.visible()) {      scrollbar.set_visible();      drawsquare = 1;      bbox(X, Y, W, H);    }  } else {    top_ = item_first(); real_position_ = offset_ = 0;    if (scrollbar.visible()) {      scrollbar.clear_visible();      clear_damage(damage()|FL_DAMAGE_SCROLL);    }  }  bbox(X, Y, W, H);  fl_clip(X, Y, W, H);  // for each line, draw it if full redraw or scrolled.  Erase background  // if not a full redraw or if it is selected:  void* l = top();  int yy = -offset_;  for (; l && yy < H; l = item_next(l)) {    int hh = item_height(l);    if (hh <= 0) continue;    if ((damage()&(FL_DAMAGE_SCROLL|FL_DAMAGE_ALL)) || l == redraw1 || l == redraw2) {      if (item_selected(l)) {	fl_color(active_r() ? selection_color() : inactive(selection_color()));	fl_rectf(X, yy+Y, W, hh);      } else if (!(damage()&FL_DAMAGE_ALL)) {	fl_color(active_r() ? color() : inactive(color()));	fl_rectf(X, yy+Y, W, hh);      }      if (type() == FL_MULTI_BROWSER && l == selection_) {	fl_color(active_r() ? textcolor() : inactive(textcolor()));	fl_rect(X+1, yy+Y, W-2, hh);      }      item_draw(l, X-hposition_, yy+Y, W+hposition_, hh);      int w = item_width(l);      if (w > max_width) {max_width = w; max_width_item = l;}    }    yy += hh;  }  // erase the area below last line:  if (!(damage()&FL_DAMAGE_ALL) && yy < H) {    fl_color(active_r() ? color() : inactive(color()));    fl_rectf(X, yy+Y, W, H-yy);  }  fl_pop_clip();  redraw1 = redraw2 = 0;  if (!dont_repeat) {    dont_repeat = 1;    // see if changes to full_height caused by calls to slow_height    // caused scrollbar state to change, in which case we have to redraw:    full_height_ = full_height();    full_width_ = full_width();    if ((has_scrollbar_ & VERTICAL) &&	((has_scrollbar_ & ALWAYS_ON) || position_ || full_height_>H)) {      if (!scrollbar.visible()) goto J1;    } else {      if (scrollbar.visible()) goto J1;    }    if ((has_scrollbar_ & HORIZONTAL) &&

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品欧美专区| 欧美喷潮久久久xxxxx| 麻豆国产精品视频| 一区二区三区加勒比av| 亚洲精品国产无套在线观| 亚洲精品美国一| 亚洲欧美日韩国产另类专区| 中文字幕第一区综合| 国产精品久久久久国产精品日日| 国产三级欧美三级日产三级99| 精品裸体舞一区二区三区| 日韩欧美国产三级| 国产亚洲成年网址在线观看| 欧美精彩视频一区二区三区| 国产精品久线在线观看| 最新国产成人在线观看| 尤物视频一区二区| 视频一区中文字幕| 国产主播一区二区| 不卡欧美aaaaa| 欧美综合一区二区| 日韩欧美成人一区| 中文字幕av不卡| 亚洲乱码一区二区三区在线观看| 亚洲国产精品麻豆| 国内精品伊人久久久久av影院| 国产麻豆9l精品三级站| 91在线国内视频| 91麻豆精品国产自产在线观看一区| 欧美一区二区三区四区高清 | 国产成人午夜电影网| 国产高清精品久久久久| 色哟哟日韩精品| 日韩三级免费观看| 自拍偷拍欧美精品| 男男gaygay亚洲| 91视频91自| 日韩你懂的电影在线观看| 国产精品国产三级国产普通话蜜臀 | 国产欧美一区二区精品性色| 亚洲欧美日韩系列| 国内精品伊人久久久久影院对白| 99久久精品国产毛片| 日韩欧美一区二区久久婷婷| 一色屋精品亚洲香蕉网站| 美国毛片一区二区| 91国偷自产一区二区三区成为亚洲经典| 91精品国产综合久久精品图片| 国产精品福利电影一区二区三区四区| 美女视频黄 久久| 91久久精品一区二区三区| 久久免费看少妇高潮| 亚洲成国产人片在线观看| 成人激情黄色小说| 精品88久久久久88久久久| 亚洲影院久久精品| 91蜜桃网址入口| 国产欧美精品一区二区色综合| 日韩激情一区二区| 欧美性三三影院| 中文字幕亚洲视频| 国产成人8x视频一区二区| 日韩一级高清毛片| 午夜免费欧美电影| 欧美午夜一区二区| 一二三四区精品视频| 91在线观看视频| 国产精品久久久久一区二区三区共| 精品国产电影一区二区| 视频一区视频二区在线观看| 色视频成人在线观看免| 综合在线观看色| 91视频免费播放| 一区在线播放视频| 一本大道综合伊人精品热热| 综合网在线视频| 色综合久久中文字幕| 亚洲视频综合在线| 色综合激情五月| 一区二区三区色| 欧美日韩精品是欧美日韩精品| 亚洲国产精品麻豆| 91精品欧美综合在线观看最新| 日韩福利视频网| 欧美成人精品高清在线播放| 久久99国产精品免费| 久久久久久久久久久久电影 | 亚洲人成网站在线| 色婷婷综合久久久中文字幕| 亚洲男人都懂的| 欧美年轻男男videosbes| 日韩精品亚洲专区| 日韩美女视频一区二区在线观看| 精品一区二区三区欧美| 国产日韩v精品一区二区| 成人一区二区视频| 一二三四区精品视频| 91精品国产入口在线| 国产在线不卡视频| 中文天堂在线一区| 欧美丝袜丝交足nylons图片| 青青草精品视频| 中文字幕国产精品一区二区| 91福利在线看| 久久成人精品无人区| 国产精品久久久久久亚洲毛片 | 精品电影一区二区三区| 国产大陆亚洲精品国产| 亚洲五码中文字幕| 亚洲精品一区二区三区四区高清| 国产99久久精品| 亚洲一区二区三区视频在线| 精品剧情在线观看| 91美女在线看| 久久av资源网| 亚洲图片有声小说| 久久久夜色精品亚洲| 欧美日韩在线观看一区二区 | 精品一区二区在线播放| 亚洲欧美综合网| 久久一夜天堂av一区二区三区| 99久久精品免费观看| 国产一区二区在线视频| 一区二区三区欧美在线观看| 国产日韩高清在线| 欧美一区二区三区播放老司机| 99久久免费精品高清特色大片| 免费观看一级特黄欧美大片| 亚洲免费观看高清| 欧美国产一区在线| 久久午夜色播影院免费高清| 欧美日韩一区久久| 99久久精品一区| 国产福利一区二区三区视频在线| 日本成人在线网站| 亚洲制服丝袜一区| 国产精品国模大尺度视频| 精品国产91久久久久久久妲己| 欧美另类变人与禽xxxxx| 91啪亚洲精品| av亚洲精华国产精华| 国产成人在线视频免费播放| 麻豆久久久久久| 蓝色福利精品导航| 日韩在线一区二区| 天天综合网天天综合色| 亚洲成人动漫在线免费观看| 亚洲精品高清视频在线观看| 亚洲欧美日韩国产中文在线| 亚洲色图清纯唯美| 亚洲黄色小说网站| 亚洲精品成人a在线观看| 一区二区在线看| 亚洲国产精品久久艾草纯爱| 亚洲精品菠萝久久久久久久| 亚洲女厕所小便bbb| 亚洲女性喷水在线观看一区| 一区二区三区四区国产精品| 国产精品国产自产拍在线| 亚洲欧美一区二区三区孕妇| 亚洲免费成人av| 亚洲bdsm女犯bdsm网站| 秋霞电影一区二区| 国产一区二区三区在线观看免费 | 国产日韩欧美精品综合| 国产清纯白嫩初高生在线观看91 | 色综合久久99| 欧美日韩久久久久久| 欧美高清视频不卡网| 日韩欧美一二三| 久久久三级国产网站| 亚洲色图丝袜美腿| 五月激情六月综合| 国产精品99久| 色综合久久综合中文综合网| 欧美另类久久久品| 久久久国际精品| 自拍偷拍国产亚洲| 日日夜夜免费精品视频| 国产精品一区二区久久不卡| eeuss鲁片一区二区三区在线看| 色国产综合视频| 日韩亚洲电影在线| 国产精品日日摸夜夜摸av| 亚洲一区二区精品视频| 国产一区999| 色偷偷一区二区三区| 欧美精品一区二区在线观看| 欧美国产激情二区三区| 午夜精品一区二区三区电影天堂| 国产一区在线观看视频| 一本久久综合亚洲鲁鲁五月天| 日韩免费一区二区| 樱花影视一区二区| 国产精品一级二级三级| 欧美久久免费观看| 18欧美亚洲精品| 国产精品一级在线| 日韩一级片网站| 亚洲福利视频一区二区|