void init_io(void) { #if defined(__TS_LINUX__) /* Basic setup. */ if (initscr() == NULL) die("could not open the screen"); notimeout(stdscr, 1); noecho(); cbreak(); keypad(stdscr, 1); #elif defined(__TS_DOS__) #elif defined(__WINDOWS__) #else # error Please define 'init_io' for your target system. #endif initialize_colors(); }
DiagramCanvas::DiagramCanvas( QWidget *parent, const char *name, bool r ) : QWidget( parent, name ), buffer( width(), height() ) { readOnly = r; initialize_colors(); setBackgroundColor( CANVAS ); buffer.resize( 600, 600 ); buffer.fill( CANVAS ); setBackgroundMode( QWidget::NoBackground ); setMouseTracking( TRUE ); edge_creation_in_progress = FALSE; vertex_drag_in_progress = FALSE; proximity_tolerance = 3; num_arcs = 0; num_links = 0; num_cuffs = 0; untouched = TRUE; drill_on = FALSE; }
int main( int argc, char *argv[] ) { PLINT mode; PLINT i; // PLplot initialization // Parse and process command line arguments plparseopts( &argc, argv, PL_PARSE_FULL ); // Initialize PLplot plinit(); // Check for drawing mode support mode = plgdrawmode(); if ( mode == PL_DRAWMODE_UNKNOWN ) { printf( "WARNING: This driver does not support drawing mode getting/setting" ); } else { // Setup colors initialize_colors(); // Draw one page per drawing mode for ( i = 0; i < NUM_MODES; i++ ) { draw_page( drawing_modes[i], drawing_mode_names[i] ); } } // Clean up plend(); exit( 0 ); }
int main(int argc, char** argv) { //Eliminate compiler warning, we're not using these for now... (void) argc; (void) argv; //Initialize rand seed... srand(time(NULL)); //Set the curses stuff up... WINDOW* screen = initscr(); initialize_colors(); cbreak(); keypad(stdscr, TRUE); //Allow curses to return Arrow keys, pagedown, home, etc. noecho(); //Stop echoing of keypresses curs_set(0); //turn cursor off nodelay(stdscr, 1); main_menu(screen); die(); printf("%d", randint(4)); return 0; }
m['C'] = "blue"; m['c'] = "blue"; m['G'] = "green"; m['g'] = "green"; m['T'] = "orange"; m['t'] = "orange"; m['N'] = "purple"; m['n'] = "purple"; m['-'] = "red"; m['*'] = "gray"; m[' '] = "white"; m['x'] = "white"; return m; } std::map<char, std::string> base_colors = initialize_colors(); void writeHeader(std::ostream& output){ output << "#\t#\t#\tALL\t" << "<style type='text/css'> " << ".ref {" << " color: white;" << " font-family: Courier;" << "} " << "td {" << " text-align:center;" << " vertical-align:middle;" << " font-family: Courier;" << " font-size: 13px;"