当前位置: 首页>>代码示例>>C++>>正文


C++ FXDCWindow::setForeground方法代码示例

本文整理汇总了C++中FXDCWindow::setForeground方法的典型用法代码示例。如果您正苦于以下问题:C++ FXDCWindow::setForeground方法的具体用法?C++ FXDCWindow::setForeground怎么用?C++ FXDCWindow::setForeground使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FXDCWindow的用法示例。


在下文中一共展示了FXDCWindow::setForeground方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: drawRaisedRectangle

void FXToolBarShell::drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  dc.setForeground(shadowColor);
  dc.fillRectangle(x,y+h-1,w,1);
  dc.fillRectangle(x+w-1,y,1,h);
  dc.setForeground(hiliteColor);
  dc.fillRectangle(x,y,w,1);
  dc.fillRectangle(x,y,1,h);
  }
开发者ID:gfphoenix,项目名称:tsiu,代码行数:8,代码来源:FXToolBarShell.cpp

示例2: drawGrooveRectangle

void FXToolBarShell::drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  dc.setForeground(shadowColor);
  dc.fillRectangle(x,y,w,1);
  dc.fillRectangle(x,y,1,h);
  dc.fillRectangle(x+1,y+h-2,w-2,1);
  dc.fillRectangle(x+w-2,y+1,1,h-2);
  dc.setForeground(hiliteColor);
  dc.fillRectangle(x+1,y+1,w-3,1);
  dc.fillRectangle(x+1,y+1,1,h-3);
  dc.fillRectangle(x,y+h-1,w,1);
  dc.fillRectangle(x+w-1,y,1,h);
  }
开发者ID:gfphoenix,项目名称:tsiu,代码行数:12,代码来源:FXToolBarShell.cpp

示例3: drawDoubleRaisedRectangle

void FXToolBarShell::drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  dc.setForeground(baseColor);
  dc.fillRectangle(x,y,w-1,1);
  dc.fillRectangle(x,y,1,h-1);
  dc.setForeground(hiliteColor);
  dc.fillRectangle(x+1,y+1,w-2,1);
  dc.fillRectangle(x+1,y+1,1,h-2);
  dc.setForeground(shadowColor);
  dc.fillRectangle(x+1,y+h-2,w-2,1);
  dc.fillRectangle(x+w-2,y+1,1,h-1);
  dc.setForeground(borderColor);
  dc.fillRectangle(x,y+h-1,w,1);
  dc.fillRectangle(x+w-1,y,1,h);
  }
开发者ID:gfphoenix,项目名称:tsiu,代码行数:14,代码来源:FXToolBarShell.cpp

示例4: drawBackground

// Draw document background
void FXRulerView::drawBackground(FXDCWindow& dc) {
    FXint docx,docy,docw,doch;

    // Background
    dc.setForeground(backColor);
    docx=getDocumentX();
    docy=getDocumentY();
    docw=getDocumentWidth();
    doch=getDocumentHeight();

    dc.fillRectangle(0,0,docx,height);
    dc.fillRectangle(docx+docw,0,width-docx-docw,height);
    dc.fillRectangle(docx,0,docw,docy);
    dc.fillRectangle(docx,docy+doch,docw,height-docy-doch);

    // Document insides
    dc.setForeground(docColor);
    dc.fillRectangle(docx,docy,docw,doch);
    dc.setForeground(FXRGB(0,0,0));
    dc.drawRectangle(docx-1,docy-1,docw+1,doch+1);
    dc.fillRectangle(docx+1,docy+doch+1,docw+2,2);
    dc.fillRectangle(docx+docw+1,docy+1,2,doch+2);
}
开发者ID:monkeyde17,项目名称:tsiu,代码行数:24,代码来源:FXRulerView.cpp

示例5: drawDownMarker

// Draw down marker
void FXRuler::drawDownMarker(FXDCWindow& dc,FXint x,FXint y){
  FXPoint points[6];
  points[0].x=x;
  points[0].y=y;
  points[1].x=x-MARKERLENGTH;
  points[1].y=y-MARKERLENGTH;
  points[2].x=x-MARKERLENGTH;
  points[2].y=y-MARKERLENGTH-MARKERLENGTH+1;
  points[3].x=x+MARKERLENGTH;
  points[3].y=y-MARKERLENGTH-MARKERLENGTH+1;
  points[4].x=x+MARKERLENGTH;
  points[4].y=y-MARKERLENGTH;
  points[5].x=x;
  points[5].y=y;
  dc.setForeground(baseColor);
  dc.fillPolygon(points,5);
  dc.setForeground(textColor);
  dc.drawLines(points,6);
  points[0].x=x;
  points[0].y=y-1;
  points[1].x=x+MARKERLENGTH-1;
  points[1].y=y-MARKERLENGTH;
  points[2].x=x+MARKERLENGTH-1;
  points[2].y=y-MARKERLENGTH-MARKERLENGTH+3;
  dc.setForeground(shadowColor);
  dc.drawLines(points,3);
  points[0].x=x;
  points[0].y=y-1;
  points[1].x=x-MARKERLENGTH+1;
  points[1].y=y-MARKERLENGTH;
  points[2].x=x-MARKERLENGTH+1;
  points[2].y=y-MARKERLENGTH-MARKERLENGTH+2;
  points[3].x=x+MARKERLENGTH-1;
  points[3].y=y-MARKERLENGTH-MARKERLENGTH+2;
  dc.setForeground(hiliteColor);
  dc.drawLines(points,4);
  }
开发者ID:Eric-Dang,项目名称:AIShare,代码行数:38,代码来源:FXRuler.cpp

示例6: drawVertTicks

// Draw vertical ticks
void FXSlider::drawVertTicks(FXDCWindow& dc,FXint x,FXint,FXint,FXint){
  register FXint interval=range[1]-range[0];
  register FXint travel,offset,v,d,p;
  if(0<interval){
    d=delta;
    if(d<=0) d=incr;
    dc.setForeground(FXRGB(0,0,0));
    travel=height-(border<<1)-padtop-padbottom-headSize-4;
    offset=height-border-padbottom-2-headSize/2;
    for(v=range[0]; v<=range[1]; v+=d){
      p=offset-(travel*(v-range[0]))/interval;
      dc.fillRectangle(x,p,TICKSIZE,1);
      }
    }
  }
开发者ID:gogglesguy,项目名称:fox,代码行数:16,代码来源:FXSlider.cpp

示例7: drawHorzTicks

// Draw horizontal ticks
void FXSlider::drawHorzTicks(FXDCWindow& dc,FXint,FXint y,FXint,FXint){
  register FXint interval=range[1]-range[0];
  register FXint travel,offset,v,d,p;
  if(0<interval){
    d=delta;
    if(d<=0) d=incr;
    dc.setForeground(FXRGB(0,0,0));
    travel=width-(border<<1)-padleft-padright-headSize-4;
    offset=border+padleft+2+headSize/2;
    for(v=range[0]; v<=range[1]; v+=d){
      p=offset+(travel*(v-range[0]))/interval;
      dc.fillRectangle(p,y,1,TICKSIZE);
      }
    }
  }
开发者ID:gogglesguy,项目名称:fox,代码行数:16,代码来源:FXSlider.cpp

示例8: drawSliderHead

// Draw slider head
void FXRealSlider::drawSliderHead(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  FXint m;
  dc.setForeground(baseColor);
  dc.fillRectangle(x,y,w,h);
  if(options&REALSLIDER_VERTICAL){
    m=(h>>1);
    if(options&REALSLIDER_ARROW_LEFT){
      dc.setForeground(hiliteColor);
      dc.drawLine(x+m,y,x+w-1,y);
      dc.drawLine(x,y+m,x+m,y);
      dc.setForeground(shadowColor);
      dc.drawLine(x+1,y+h-m-1,x+m+1,y+h-1);
      dc.drawLine(x+m,y+h-2,x+w-1,y+h-2);
      dc.drawLine(x+w-2,y+1,x+w-2,y+h-1);
      dc.setForeground(borderColor);
      dc.drawLine(x,y+h-m-1,x+m,y+h-1);
      dc.drawLine(x+w-1,y+h-1,x+w-1,y);
      dc.fillRectangle(x+m,y+h-1,w-m,1);
      }
    else if(options&REALSLIDER_ARROW_RIGHT){
      dc.setForeground(hiliteColor);
      dc.drawLine(x,y,x+w-m-1,y);
      dc.drawLine(x,y+1,x,y+h-1);
      dc.drawLine(x+w-1,y+m,x+w-m-1,y);
#ifndef WIN32
      dc.setForeground(shadowColor);
      dc.drawLine(x+w-2,y+h-m-1,x+w-m-2,y+h-1);
      dc.drawLine(x+1,y+h-2,x+w-m-1,y+h-2);
      dc.setForeground(borderColor);
      dc.drawLine(x+w-1,y+h-m-1,x+w-m-1,y+h-1);
      dc.drawLine(x,y+h-1,x+w-m-1,y+h-1);
#else
      dc.setForeground(shadowColor);
      dc.drawLine(x+w-1,y+h-m-2,x+w-m-2,y+h-1);
      dc.drawLine(x+1,y+h-2,x+w-m-1,y+h-2);
      dc.setForeground(borderColor);
      dc.drawLine(x+w,y+h-m-2,x+w-m-1,y+h-1);
      dc.drawLine(x,y+h-1,x+w-m-1,y+h-1);
#endif
      }
    else if(options&REALSLIDER_INSIDE_BAR){
      drawDoubleRaisedRectangle(dc,x,y,w,h);
      dc.setForeground(shadowColor);
      dc.drawLine(x+1,y+m-1,x+w-2,y+m-1);
      dc.setForeground(hiliteColor);
      dc.drawLine(x+1,y+m,x+w-2,y+m);
      }
    else{
      drawDoubleRaisedRectangle(dc,x,y,w,h);
      }
    }
开发者ID:Eric-Dang,项目名称:AIShare,代码行数:52,代码来源:FXRealSlider.cpp

示例9: drawBorderRectangle

void FXToolBarShell::drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  dc.setForeground(borderColor);
  dc.drawRectangle(x,y,w-1,h-1);
  }
开发者ID:gfphoenix,项目名称:tsiu,代码行数:4,代码来源:FXToolBarShell.cpp

示例10: drawTextFragment

// Draw fragment of text in given style
void FXConsole::drawTextFragment(FXDCWindow& dc,FXint x,FXint y,FXint,FXint,const FXchar *text,FXint n,FXuint sty) const {
  register FXColor color=FXRGB(255,255,255);
  dc.setForeground(color);
  y+=font->getFontAscent();
  dc.drawText(x,y,text,n);
  }
开发者ID:gogglesguy,项目名称:fox,代码行数:7,代码来源:FXConsole.cpp


注:本文中的FXDCWindow::setForeground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。