# Gambas Form File 1.0

{ Form Form
  MoveScaled(5.5556,5.5556,57,56)
  'Move(50,50,513,504)
  Text = ("Gambas Printing Demo")
  Icon = Picture["Images/document-print.png"]
  Arrangement = Arrange.Fill
  { TabStripItems TabStrip
    MoveScaled(0,0,55.5556,55.5556)
    'Move(0,0,500,500)
    Count = 5
    Index = 0
    Text = ("Text")
    Picture = Picture["Images/text-x-generic.png"]
    { ToolButtonOpenText ToolButton
      MoveScaled(0,0,5,5)
      'Move(0,0,45,45)
      ToolTip = ("Open Text Document")
      Text = ("")
      Picture = Picture["Images/document-open.png"]
    }
    { ToolButtonFont ToolButton
      MoveScaled(5,0,5,5)
      'Move(45,0,45,45)
      ToolTip = ("Select Font")
      Text = ("")
      Picture = Picture["Images/fonts.png"]
    }
    { ToolButtonTextColor ToolButton
      MoveScaled(10,0,5,5)
      'Move(90,0,45,45)
      ToolTip = ("Select Text Color")
      Text = ("")
      Picture = Picture["Images/colors.png"]
    }
    { ToolButtonPrintText ToolButton
      MoveScaled(27,0,5,5)
      'Move(243,0,45,45)
      ToolTip = ("Print Text Document")
      Text = ("")
      Picture = Picture["Images/document-print.png"]
    }
    { CheckBoxWordWrap CheckBox
      MoveScaled(15,1,12,3)
      'Move(135,9,108,27)
      ToolTip = ("Toggle the Word Wrap option.\nWhen the box is check any line of text that is longer then the\ndisplay or printer width will be warped to the next line. ")
      Text = ("Word Wrap")
    }
    { TextAreaText TextArea
      MoveScaled(0,5,35,17)
      'Move(0,45,315,153)
      Text = ("")
    }
    Index = 1
    Text = ("Image")
    Picture = Picture["Images/image-gallery.png"]
    { ToolButtonOpenImage ToolButton
      MoveScaled(0,0,5,5)
      'Move(0,0,45,45)
      ToolTip = ("Open Image")
      Text = ("")
      Picture = Picture["Images/document-open.png"]
    }
    { ToolButtonPrintImage ToolButton
      MoveScaled(5,0,5,5)
      'Move(45,0,45,45)
      ToolTip = ("Print Image")
      Text = ("")
      Picture = Picture["Images/document-print.png"]
    }
    { ScrollViewImage ScrollView
      MoveScaled(0,5,39,33)
      'Move(0,45,351,297)
      { DrawingAreaImage DrawingArea
        MoveScaled(0,0,28,15)
        'Move(0,0,252,135)
      }
    }
    { CheckBoxFitImage CheckBox
      MoveScaled(12,0,26,5)
      'Move(108,0,234,45)
      Text = ("Fit Image to Printer Page")
    }
    Index = 2
    Text = ("Drawing")
    Picture = Picture["Images/image-x-generic.png"]
    { ToolButtonOpenDrawing ToolButton
      MoveScaled(0,0,5,5)
      'Move(0,0,45,45)
      ToolTip = ("Open Drawing")
      Text = ("")
      Picture = Picture["Images/document-open.png"]
    }
    { ToolButtonPrintDrawing ToolButton
      MoveScaled(5,0,5,5)
      'Move(45,0,45,45)
      ToolTip = ("Print Drawing")
      Text = ("")
      Picture = Picture["Images/document-print.png"]
    }
    { ScrollViewDrawing ScrollView
      MoveScaled(0,5,30,23)
      'Move(0,45,270,207)
      { DrawingAreaDrawing DrawingArea
        MoveScaled(0,0,20,15)
        'Move(0,0,180,135)
      }
    }
    { CheckBoxFitDrawing CheckBox
      MoveScaled(12,0,24,5)
      'Move(108,0,216,45)
      Text = ("Fit Drawing to Printer Page")
    }
    Index = 3
    Text = ("Two Images")
    Picture = Picture["Images/image-gallery.png"]
    { ToolButtonOpenImageOne ToolButton ToolButtonOpenTwoImages
      MoveScaled(0,0,5,5)
      'Move(0,0,45,45)
      Tag = "Top"
      ToolTip = ("Open Top Image")
      Text = ("")
      Picture = Picture["Images/document-open.png"]
    }
    { ToolButtonOpenImageTwo ToolButton ToolButtonOpenTwoImages
      MoveScaled(5,0,5,5)
      'Move(45,0,45,45)
      Tag = "Bottom"
      ToolTip = ("Open Bottom Image")
      Text = ("")
      Picture = Picture["Images/document-open.png"]
    }
    { ToolButtonPrintTwoImgEx1 ToolButton
      MoveScaled(10,0,5,5)
      'Move(90,0,45,45)
      ToolTip = ("Print two images with text centred above the images.\n(No text wrap.)")
      Text = ("")
      Picture = Picture["Images/document-print.png"]
    }
    { ToolButtonPrintTwoImgEx2 ToolButton
      MoveScaled(15,0,5,5)
      'Move(135,0,45,45)
      ToolTip = ("Print two image.\nAt the top the image is on the right and the text is on the left.\nAt the botton the image is on the left and the text is on the right.\nText that overflows the required width will be wraped to the next line.")
      Text = ("")
      Picture = Picture["Images/document-print.png"]
    }
    { HSplitTwoImages HSplit
      MoveScaled(0,5,53,42)
      'Move(0,45,477,378)
      { VSplit1 VSplit
        MoveScaled(0,0,24,37)
        'Move(0,0,216,333)
        { TextAreaTopImage TextArea
          MoveScaled(0,0,20,7)
          'Move(0,0,180,63)
          Text = ("Text for Image 1\nThis is the top image")
        }
        { ScrollView1 ScrollView
          MoveScaled(0,8,20,23)
          'Move(0,72,180,207)
          { DrawingAreaTopImage DrawingArea
            MoveScaled(0,0,14,15)
            'Move(0,0,126,135)
            Cached = True
          }
        }
      }
      { VSplit2 VSplit
        MoveScaled(25,0,24,37)
        'Move(225,0,216,333)
        { TextAreaBottomImage TextArea
          MoveScaled(0,0,20,7)
          'Move(0,0,180,63)
          Text = ("Text for Image 2\nThis is the bottom image")
        }
        { ScrollView2 ScrollView
          MoveScaled(0,8,20,23)
          'Move(0,72,180,207)
          { DrawingAreaBottomImage DrawingArea
            MoveScaled(0,0,11,15)
            'Move(0,0,99,135)
            Cached = True
          }
        }
      }
    }
    Index = 4
    Text = ("About")
    Picture = Picture["Images/usergreenbeard1.png"]
    { TextLabelAbout TextLabel
      MoveScaled(1,1,54,58)
      'Move(9,9,486,522)
      Background = &HEFFFBF&
      Text = ("<h1><font color='Blue'>Printing</font></h1>\n<h3>A Simple Gambas Printing Demo</h3>\n<hr>\n<p>This example is designed to show you how to do simple printing of text, images and drawings. There are comments in the code that describe what we are doing.\n</p>\n<p>On each tab you can click on the <font color='Blue'><b>Open</b></font> button and select a file of the required type and then the <font color='Blue'><b>Print</b></font> button becomes available.\n</p>\n<p>For text you can also change the font, color and select the word wrap option. \n</p>\n<p>For images and drawings you can also scale the image/drawing to fill the printer page. \n</p>\n<p>Have a look at the <b>ReadMe.txt</b> file for a few notes.\n</p>\n<hr>\n<p>This program is distributed in the hope that it will be useful, but<b> WITHOUT ANY WARRANTY</b>.\n</p>\n<p>Printing Demo v.0.0.4 was developed by Timothy Marshal-Nichols in September 2006. It is issued under <b>The GNU General Public License 2</b> or any later version.\n</p>\n<hr>")
      Border = Border.Raised
    }
    Index = 0
  }
}
