Blob Blame History Raw
! 
! Motif
!
! Copyright (c) 1987-2012, The Open Group. All rights reserved.
!
! These libraries and programs are free software; you can
! redistribute them and/or modify them under the terms of the GNU
! Lesser General Public License as published by the Free Software
! Foundation; either version 2 of the License, or (at your option)
! any later version.
!
! These libraries and programs are distributed in the hope that
! they will be useful, but WITHOUT ANY WARRANTY; without even the
! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! PURPOSE. See the GNU Lesser General Public License for more
! details.
!
! You should have received a copy of the GNU Lesser General Public
! License along with these librararies and programs; if not, write
! to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
! Floor, Boston, MA 02110-1301 USA
! 
! 
! HISTORY
! 
!   $XConsortium: icon.uil /main/7 1995/07/13 20:46:29 drk $
!******************************************************************************
module Test
        version = 'v1.0'
        names = case_sensitive

  include file "icon.msg";
  
  procedure
          exit_test();
	  Report_Callback(string);

  value
	  wheat	 : color('wheat');
	  navy	 : color('navy');
	  black  : color('black',background);
	  white  : color('white',foreground);
	  green  : color('green',foreground);
	  blue   : color('blue',foreground);
	  yellow : color('yellow',foreground);
	  orange : color('orange',foreground);
	  violet : color('violet',foreground);
	  red    : color('red',foreground);
	
  value 
	colors_8 : color_table(black = ' ',
       			       white='x',
        		       red='r',
        		       green='g',
        		       blue='b',
        		       yellow='y',
       			       orange='o',
       			       violet='v');

   value

        palette: icon(color_table=colors_8,
		'                                ',
		'                                ',
		'           xxxxxxxxxx           ',
		'         xx          xx         ',
		'       xx              x        ',
		'      x     rrrr        x       ',
		'    xx      rrr        x        ',
		'   x   b    r       xxx         ',
		'   x  bbb         xx            ',
		'  x   bbb        xx             ',
		' x     b         x              ',
		' x           xxx  x     xxxxxx  ',
		'x  ggg      x   x  xxxxx      x ',
		'x  gggg    x    x              x',
		'x   g      x    x              x',
		'x          xx  x       oooo    x',
		'x           xxx        ooo     x',
		'x  yyyy                 o      x',
		'x  yyy                         x',
		'x   y                          x',
		' x                 xxxx       x ',
		' x     ooo          xx        x ',
		'  x    ooo    v      xx      x  ',
		'   x         vvv            x   ',
		'    x        vvv           x    ',
		'     x       v            x     ',
		'      x                  x      ',
		'       xx              xx       ',
		'         xx          xx         ',
		'           xxxxxxxxxx           ',
		'                                ',
		'                                ');


  value COLORTABLE_FOO : color_table	(color('gray')='*',
					color('SlateBlue')='.',
					background color=' ');

  value P2267 : icon (color_table = COLORTABLE_FOO,
		'********         ........        ********        ........',
		'********         ........        ********        ........',
		'        ........         ********        ........        ',
		'        ........         ********        ........        ',
		'........        ********         ........        ********',
		'........        ********         ........        ********',
		'********         ........        ********        ........',
		'********         ........        ********        ........',
		'        ........         ********        ........        ',
		'        ........         ********        ........        ',
		'........        ********         ........        ********',
		'........        ********         ........        ********',
		'********         ........        ********        ........',
		'********         ........        ********        ........',
		'        ........         ********        ........        ',
		'        ........         ********        ........        ',
		'........        ********         ........        ********',
		'........        ********         ........        ********',
		'********         ........        ********        ........',
		'********         ........        ********        ........',
		'        ........         ********        ........        ',
		'        ........         ********        ........        ',
		'........        ********         ........        ********',
		'........        ********         ........        ********');


  object                                  ! The main window widget.
          S_MAIN_WIDGET : XmBulletinBoard {
  
              arguments {
                  XmNx = 0;
                  XmNy = 0;
                  XmNdialogTitle =  compound_string ("BBoard Test");
              };
    	      controls {
                  XmBulletinBoardDialog 	explanation;
                  XmBulletinBoard    Bulletin_Board;
		  XmBulletinBoard    Bulletin_Board2;
		  XmBulletinBoard    Bulletin_Board3;
  	      };
  	  };

  value
        coral: rgb (65025, 12996, 7396);


  object
        Bulletin_Board :  XmBulletinBoard {
            arguments {
                XmNwidth =  200;
                XmNheight =  200;
                XmNborderWidth =  5;
                XmNbackground =  white;
                XmNmarginWidth =  50;
                XmNmarginHeight =  50;
                XmNdefaultPosition =  false;
                XmNnoResize =  true;
            };
	    controls {
		XmLabel		pix_label;
	    };
        };

object
	pix_label :	XmLabel {
		arguments {
			XmNlabelType = XmPIXMAP;
			XmNlabelPixmap = palette;
		};
	};

  object
        Bulletin_Board2 :  XmBulletinBoard {
            arguments {
                XmNwidth =  200;
		XmNx	 =  0;
		XmNy	 = 400;
                XmNheight =  200;
                XmNborderWidth =  5;
                XmNbackground =  red;
                XmNmarginWidth =  50;
                XmNmarginHeight =  50;
                XmNdefaultPosition =  false;
                XmNnoResize =  true;
            };
	    controls {
		XmLabel		pix_label2;
	    };
        };

object
	pix_label2 :	XmLabel {
		arguments {
			XmNlabelType = XmPIXMAP;
			XmNlabelPixmap = palette;
		};
	};

  object
        Bulletin_Board3 :  XmBulletinBoard {
            arguments {
                XmNwidth =  200;
		XmNx	 =  201;
		XmNy	 =  200;
                XmNheight =  400;
                XmNborderWidth =  5;
                XmNbackground =  yellow;
                XmNmarginWidth =  50;
                XmNmarginHeight =  50;
                XmNdefaultPosition =  false;
                XmNnoResize =  true;
            };
	    controls {
		XmLabel		pix_label3;
	    };
        };

object
	pix_label3 :	XmLabel {
		arguments {
			XmNlabelType = XmPIXMAP;
			XmNlabelPixmap = P2267;
		};
	};


object
	explanation : XmBulletinBoardDialog {
			arguments { 
				  XmNx = 500;
				  XmNy  = 0;
				  XmNdefaultPosition = false;
				  XmNbackground = wheat;
				  XmNforeground = navy;
				  };
			controls  {
				  XmPushButton	pushb1;
      				  XmLabel	        label1;
				  XmText		text1;
			    	  };
                 };

object
	pushb1 :	XmPushButton {
			arguments {
				  XmNx = 0;
				  XmNy = 0;
				  XmNbackground = wheat;
				  XmNforeground = navy;
			 	  XmNlabelString = compound_string("Exit");
				  };
			callbacks {
				  XmNarmCallback = procedure exit_test();
				  };
		};

object
	label1 : XmLabel {
			arguments {
				  XmNx = 60;
				  XmNy = 0;
				  XmNbackground = wheat;
				  XmNforeground = navy;
				  XmNlabelString = compound_string("Explanation of Widget Displayed");
				  };
		};
		

object
	text1 : XmText {
			arguments {
				  XmNx = 0;
				  XmNy = 40;  
				  XmNheight = 250;
				  XmNwidth = 300;
				  XmNwordWrap = true;
				  XmNeditMode = XmMULTI_LINE_EDIT;
				  XmNeditable = false;
				  XmNbackground = wheat;
				  XmNforeground = navy;
				  XmNvalue = message;
				  };
				   
		};
end module;