Logo Search packages:      
Sourcecode: mancala version File versions  Download package

xform.c

/* Form definition file generated with fdesign. */

#include "forms.h"
#include <stdlib.h>
#include "xform.h"

FD_mancala *create_form_mancala(void)
{
  FL_OBJECT *obj;
  FD_mancala *fdui = (FD_mancala *) fl_calloc(1, sizeof(*fdui));
  int old_bw = fl_get_border_width();

  fl_set_border_width(1);
  fdui->mancala = fl_bgn_form(FL_NO_BOX, 530, 220);
  obj = fl_add_box(FL_UP_BOX,0,0,530,220,"");
  obj = fl_add_text(FL_NORMAL_TEXT,370,75,150,15,"Glenn Terje Lines");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  obj = fl_add_frame(FL_ENGRAVED_FRAME,10,25,350,150,"");
  fdui->holeT0 = obj = fl_add_button(FL_NORMAL_BUTTON,65,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,100);
  fdui->holeT1 = obj = fl_add_button(FL_NORMAL_BUTTON,105,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,101);
  fdui->holeT2 = obj = fl_add_button(FL_NORMAL_BUTTON,145,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,102);
  fdui->holeT3 = obj = fl_add_button(FL_NORMAL_BUTTON,185,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,103);
  fdui->holeT4 = obj = fl_add_button(FL_NORMAL_BUTTON,225,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,104);
  fdui->holeT5 = obj = fl_add_button(FL_NORMAL_BUTTON,265,60,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,105);
  fdui->holeB5 = obj = fl_add_button(FL_NORMAL_BUTTON,65,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,5);
  fdui->holeB4 = obj = fl_add_button(FL_NORMAL_BUTTON,105,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,4);
  fdui->holeB3 = obj = fl_add_button(FL_NORMAL_BUTTON,145,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,3);
  fdui->holeB2 = obj = fl_add_button(FL_NORMAL_BUTTON,185,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,2);
  fdui->holeB1 = obj = fl_add_button(FL_NORMAL_BUTTON,225,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,1);
  fdui->holeB0 = obj = fl_add_button(FL_NORMAL_BUTTON,265,100,40,40,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
    fl_set_object_callback(obj,doHole,0);
  fdui->playerB = obj = fl_add_text(FL_NORMAL_TEXT,105,150,160,20,"");
    fl_set_object_lcol(obj,FL_PALEGREEN);
    fl_set_object_lsize(obj,FL_MEDIUM_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_ENGRAVED_STYLE);
  fdui->textStatus = obj = fl_add_text(FL_NORMAL_TEXT,10,190,350,20,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_BLUE);
    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  fdui->buttRules = obj = fl_add_button(FL_NORMAL_BUTTON,370,190,70,20,"Rules");
    fl_set_object_callback(obj,doRules,0);
  obj = fl_add_text(FL_NORMAL_TEXT,370,10,150,35,"Mancala");
    fl_set_object_lcol(obj,FL_DARKGOLD);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLDITALIC_STYLE+FL_EMBOSSED_STYLE);
  fdui->textVer = obj = fl_add_text(FL_NORMAL_TEXT,370,40,150,15,"");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  fdui->mancalaT = obj = fl_add_text(FL_NORMAL_TEXT,15,60,45,80,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
  fdui->lightT0 = obj = fl_add_box(FL_FLAT_BOX,70,50,30,5,"");
  fdui->lightT1 = obj = fl_add_box(FL_FLAT_BOX,110,50,30,5,"");
  fdui->lightT2 = obj = fl_add_box(FL_FLAT_BOX,150,50,30,5,"");
  fdui->lightT3 = obj = fl_add_box(FL_FLAT_BOX,190,50,30,5,"");
  fdui->lightT4 = obj = fl_add_box(FL_FLAT_BOX,230,50,30,5,"");
  fdui->lightT5 = obj = fl_add_box(FL_FLAT_BOX,270,50,30,5,"");
  fdui->lightB0 = obj = fl_add_box(FL_FLAT_BOX,270,145,30,5,"");
  fdui->lightB1 = obj = fl_add_box(FL_FLAT_BOX,230,145,30,5,"");
  fdui->lightB2 = obj = fl_add_box(FL_FLAT_BOX,190,145,30,5,"");
  fdui->lightB3 = obj = fl_add_box(FL_FLAT_BOX,150,145,30,5,"");
  fdui->lightB4 = obj = fl_add_box(FL_FLAT_BOX,110,145,30,5,"");
  fdui->lightB5 = obj = fl_add_box(FL_FLAT_BOX,70,145,30,5,"");
  fdui->playerT = obj = fl_add_text(FL_NORMAL_TEXT,105,30,160,20,"");
    fl_set_object_lcol(obj,FL_PALEGREEN);
    fl_set_object_lsize(obj,FL_MEDIUM_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_ENGRAVED_STYLE);
  fdui->mancalaB = obj = fl_add_text(FL_NORMAL_TEXT,310,60,45,80,"");
    fl_set_object_boxtype(obj,FL_DOWN_BOX);
    fl_set_object_lcol(obj,FL_SLATEBLUE);
    fl_set_object_lsize(obj,FL_HUGE_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
  fdui->slidLevel = obj = fl_add_valslider(FL_HOR_SLIDER,370,150,150,15,"Difficulty Level");
    fl_set_object_callback(obj,doLevel,0);
     fl_set_slider_return(obj, FL_RETURN_CHANGED);
  fdui->buttNewGameB = obj = fl_add_button(FL_NORMAL_BUTTON,370,100,150,20,"New Game, Human 1st");
    fl_set_object_callback(obj,doNewGame,0);
  fdui->buttNewGameT = obj = fl_add_button(FL_NORMAL_BUTTON,370,125,150,20,"New Game, Computer 1st");
    fl_set_object_callback(obj,doNewGame,1);
  fdui->startT = obj = fl_add_text(FL_NORMAL_TEXT,15,30,90,10,"");
    fl_set_object_lsize(obj,FL_TINY_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  fdui->startB = obj = fl_add_text(FL_NORMAL_TEXT,265,160,90,10,"");
    fl_set_object_lsize(obj,FL_TINY_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  fdui->winB = obj = fl_add_text(FL_NORMAL_TEXT,275,150,80,10,"");
    fl_set_object_lsize(obj,FL_TINY_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
  fdui->winT = obj = fl_add_text(FL_NORMAL_TEXT,15,40,90,10,"");
    fl_set_object_lsize(obj,FL_TINY_SIZE);
    fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  fdui->buttQuit = obj = fl_add_button(FL_NORMAL_BUTTON,450,190,70,20,"Quit");
    fl_set_object_callback(obj,doQuit,0);
  obj = fl_add_text(FL_NORMAL_TEXT,370,60,150,15,"Sverre H. Huseby");
    fl_set_object_lalign(obj,FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  fl_end_form();
  fl_set_border_width(old_bw);

  return fdui;
}
/*---------------------------------------*/

FD_rules *create_form_rules(void)
{
  FL_OBJECT *obj;
  FD_rules *fdui = (FD_rules *) fl_calloc(1, sizeof(*fdui));
  int old_bw = fl_get_border_width();

  fl_set_border_width(1);
  fdui->rules = fl_bgn_form(FL_NO_BOX, 505, 300);
  obj = fl_add_box(FL_UP_BOX,0,0,505,300,"");
  fdui->buttRulesDone = obj = fl_add_button(FL_NORMAL_BUTTON,10,270,485,20,"Ok, I know the rules");
    fl_set_object_callback(obj,doRulesDone,0);
  fdui->textRules = obj = fl_add_browser(FL_NORMAL_BROWSER,10,10,485,255,"");
    fl_set_object_callback(obj,doRules,0);
  fl_end_form();
  fl_set_border_width(old_bw);

  return fdui;
}
/*---------------------------------------*/


Generated by  Doxygen 1.6.0   Back to index