Пример #1
0
int main()
{
  int err, col, row, i;


  if ((err = fbopen()) != 0) {
    fprintf(stderr, "Error: Could not open framebuffer: %d\n", err);
    exit(1);
  }
  
  // Clear the screen before starting
  fbclearlines(0, 47);
  
 /* init: Draw 12 bands at distinct frequencies as well as 
  *the dials in the middle of the bands 
  */
  for (i = 1 ; i < 13 ; i++) {
    for (row = 470; row > 370; row--){
	    fbputchar('I', row, COL_NUM(i));
    }
    updatedial(420, COL_NUM(i)); 
  }
  //Initialize current cursor state for first column
  

  
  
  
  // The position of the cursor
  int keyRow = 420, keyCol = 30;
  
  // Display the cursor
  fbputchar(95, keyRow, keyCol);
  return 0; 
} //end main
Пример #2
0
void AlphaBallControl::layout(){
  register FXint ww,hh,ss;
  ww=width-padleft-padright-(border<<1);
  hh=height-padtop-padbottom-(border<<1);
  ss=FXMAX(3,FXMIN(ww,hh));
  if(dial->getWidth()!=ss){
    dial->resize(ss,ss);
    updatedial();
    dial->render();
  }
  dialx=border+padleft+(ww-ss)/2;
  dialy=border+padtop+(hh-ss)/2;
  spottoxy(spotx,spoty,alphaxy[0],alphaxy[1]);
  flags&=~FLAG_DIRTY;
}
Пример #3
0
void AlphaBallControl::create(){
  FXFrame::create();
  updatedial();
  dial->create();
}