void draw_button( const Point & upper_left)
{
cwin <<Message(Point (12,20),"Click for new location and enter label");
string a1="";
Point topleft = upper_left;
a1 = cwin.get_string (a1);
topleft.move(-.5*LETTER_WIDTH ,.1*LETTER_HEIG HT);
Point topright = topleft;
topright.move(( a1.length()+1)* LETTER_WIDTH,0) ;
Point botleft = topleft;
botleft.move(0, 1.5*LETTER_HEIG HT);
Point botright = botleft;
botright.move(( a1.length()+1)* LETTER_WIDTH,0) ;
cwin << Line(topleft,to pright) << Line(topright,b otright)
<< Line(botright,b otleft) << Line(botleft,to pleft);
cwin << Message(upper_l eft,a1);
return;
}
// Write the control flow of your program in the main function
int ccc_win_main()
{
cwin.coord(0,0, 100,100);
draw_button(Poi nt(70,70));
do
{
return 0;
}
{
cwin <<Message(Point (12,20),"Click for new location and enter label");
string a1="";
Point topleft = upper_left;
a1 = cwin.get_string (a1);
topleft.move(-.5*LETTER_WIDTH ,.1*LETTER_HEIG HT);
Point topright = topleft;
topright.move(( a1.length()+1)* LETTER_WIDTH,0) ;
Point botleft = topleft;
botleft.move(0, 1.5*LETTER_HEIG HT);
Point botright = botleft;
botright.move(( a1.length()+1)* LETTER_WIDTH,0) ;
cwin << Line(topleft,to pright) << Line(topright,b otright)
<< Line(botright,b otleft) << Line(botleft,to pleft);
cwin << Message(upper_l eft,a1);
return;
}
// Write the control flow of your program in the main function
int ccc_win_main()
{
cwin.coord(0,0, 100,100);
draw_button(Poi nt(70,70));
do
{
return 0;
}
Comment