From 7fab31cbb378ff8cbd63afad62c6f3b1cb3fd33e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 3 Sep 2008 16:44:14 +0000 Subject: [PATCH] Add a simple Hello World application to demonstrate the library --- Build | 9 + dejavu-10.font | 1341 ++++++++++++++++++++++++++++++++++++++++++++++++ dejavu-10.png | Bin 0 -> 6934 bytes helloworld.cpp | 133 +++++ helloworld.gui | 106 ++++ helloworld.png | Bin 0 -> 558 bytes 6 files changed, 1589 insertions(+) create mode 100644 dejavu-10.font create mode 100644 dejavu-10.png create mode 100644 helloworld.cpp create mode 100644 helloworld.gui create mode 100644 helloworld.png diff --git a/Build b/Build index 637801e..5f02b61 100644 --- a/Build +++ b/Build @@ -17,4 +17,13 @@ package "mspgltk" install true; install_headers "msp/gltk"; }; + + program "helloworld" + { + source "helloworld.cpp"; + build_info + { + library "mspgltk"; + }; + }; }; diff --git a/dejavu-10.font b/dejavu-10.font new file mode 100644 index 0000000..21de49b --- /dev/null +++ b/dejavu-10.font @@ -0,0 +1,1341 @@ +texture "dejavu-10.png"; +default_size 10; +ascent 1.000; +descent -0.300; +glyph 32 +{ + texcoords 0.035156 0.960938 0.035156 0.960938; + size 0.000 0.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 33 +{ + texcoords 0.101562 0.960938 0.105469 0.988281; + size 0.100 0.700; + offset 0.200 0.000; + advance 0.400; +}; +glyph 34 +{ + texcoords 0.167969 0.976562 0.179688 0.988281; + size 0.300 0.300; + offset 0.100 0.400; + advance 0.500; +}; +glyph 35 +{ + texcoords 0.230469 0.960938 0.257812 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 36 +{ + texcoords 0.304688 0.957031 0.328125 0.988281; + size 0.600 0.800; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 37 +{ + texcoords 0.371094 0.960938 0.402344 0.988281; + size 0.800 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 38 +{ + texcoords 0.441406 0.960938 0.468750 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.900; +}; +glyph 39 +{ + texcoords 0.523438 0.976562 0.527344 0.988281; + size 0.100 0.300; + offset 0.100 0.400; + advance 0.300; +}; +glyph 40 +{ + texcoords 0.593750 0.957031 0.601562 0.992188; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 41 +{ + texcoords 0.664062 0.957031 0.671875 0.992188; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 42 +{ + texcoords 0.726562 0.972656 0.746094 0.988281; + size 0.500 0.400; + offset 0.000 0.300; + advance 0.500; +}; +glyph 43 +{ + texcoords 0.792969 0.960938 0.820312 0.988281; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 44 +{ + texcoords 0.875000 0.957031 0.878906 0.964844; + size 0.100 0.200; + offset 0.100 -0.100; + advance 0.300; +}; +glyph 45 +{ + texcoords 0.941406 0.968750 0.953125 0.972656; + size 0.300 0.100; + offset 0.100 0.200; + advance 0.400; +}; +glyph 46 +{ + texcoords 0.031250 0.890625 0.035156 0.894531; + size 0.100 0.100; + offset 0.100 0.000; + advance 0.300; +}; +glyph 47 +{ + texcoords 0.097656 0.886719 0.109375 0.917969; + size 0.300 0.800; + offset 0.000 -0.100; + advance 0.300; +}; +glyph 48 +{ + texcoords 0.164062 0.890625 0.183594 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 49 +{ + texcoords 0.234375 0.890625 0.253906 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 50 +{ + texcoords 0.304688 0.890625 0.328125 0.917969; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 51 +{ + texcoords 0.375000 0.890625 0.394531 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 52 +{ + texcoords 0.445312 0.890625 0.464844 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 53 +{ + texcoords 0.515625 0.890625 0.535156 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 54 +{ + texcoords 0.585938 0.890625 0.605469 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 55 +{ + texcoords 0.656250 0.890625 0.675781 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 56 +{ + texcoords 0.726562 0.890625 0.746094 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 57 +{ + texcoords 0.796875 0.890625 0.816406 0.917969; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 58 +{ + texcoords 0.875000 0.890625 0.878906 0.910156; + size 0.100 0.500; + offset 0.100 0.000; + advance 0.300; +}; +glyph 59 +{ + texcoords 0.945312 0.886719 0.949219 0.910156; + size 0.100 0.600; + offset 0.100 -0.100; + advance 0.300; +}; +glyph 60 +{ + texcoords 0.023438 0.824219 0.046875 0.843750; + size 0.600 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 61 +{ + texcoords 0.093750 0.828125 0.117188 0.839844; + size 0.600 0.300; + offset 0.100 0.200; + advance 0.800; +}; +glyph 62 +{ + texcoords 0.164062 0.824219 0.187500 0.843750; + size 0.600 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 63 +{ + texcoords 0.238281 0.820312 0.253906 0.847656; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.500; +}; +glyph 64 +{ + texcoords 0.296875 0.812500 0.332031 0.847656; + size 0.900 0.900; + offset 0.100 -0.200; + advance 1.100; +}; +glyph 65 +{ + texcoords 0.371094 0.820312 0.398438 0.847656; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.700; +}; +glyph 66 +{ + texcoords 0.445312 0.820312 0.464844 0.847656; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 67 +{ + texcoords 0.515625 0.820312 0.539062 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 68 +{ + texcoords 0.585938 0.820312 0.609375 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 69 +{ + texcoords 0.656250 0.820312 0.675781 0.847656; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 70 +{ + texcoords 0.730469 0.820312 0.746094 0.847656; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 71 +{ + texcoords 0.796875 0.820312 0.820312 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 72 +{ + texcoords 0.867188 0.820312 0.890625 0.847656; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 73 +{ + texcoords 0.945312 0.820312 0.949219 0.847656; + size 0.100 0.700; + offset 0.100 0.000; + advance 0.300; +}; +glyph 74 +{ + texcoords 0.027344 0.742188 0.039062 0.777344; + size 0.300 0.900; + offset -0.100 -0.200; + advance 0.300; +}; +glyph 75 +{ + texcoords 0.093750 0.750000 0.117188 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 76 +{ + texcoords 0.164062 0.750000 0.183594 0.777344; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 77 +{ + texcoords 0.230469 0.750000 0.257812 0.777344; + size 0.700 0.700; + offset 0.100 0.000; + advance 0.900; +}; +glyph 78 +{ + texcoords 0.304688 0.750000 0.328125 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 79 +{ + texcoords 0.375000 0.750000 0.398438 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 80 +{ + texcoords 0.445312 0.750000 0.464844 0.777344; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 81 +{ + texcoords 0.515625 0.746094 0.539062 0.777344; + size 0.600 0.800; + offset 0.100 -0.100; + advance 0.800; +}; +glyph 82 +{ + texcoords 0.585938 0.750000 0.609375 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 83 +{ + texcoords 0.656250 0.750000 0.679688 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 84 +{ + texcoords 0.726562 0.750000 0.746094 0.777344; + size 0.500 0.700; + offset 0.000 0.000; + advance 0.500; +}; +glyph 85 +{ + texcoords 0.796875 0.750000 0.820312 0.777344; + size 0.600 0.700; + offset 0.100 0.000; + advance 0.800; +}; +glyph 86 +{ + texcoords 0.859375 0.750000 0.894531 0.777344; + size 0.900 0.700; + offset -0.100 0.000; + advance 0.700; +}; +glyph 87 +{ + texcoords 0.929688 0.750000 0.964844 0.777344; + size 0.900 0.700; + offset 0.000 0.000; + advance 0.900; +}; +glyph 88 +{ + texcoords 0.023438 0.679688 0.046875 0.707031; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 89 +{ + texcoords 0.089844 0.679688 0.117188 0.707031; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.700; +}; +glyph 90 +{ + texcoords 0.164062 0.679688 0.187500 0.707031; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 91 +{ + texcoords 0.242188 0.675781 0.250000 0.710938; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 92 +{ + texcoords 0.308594 0.675781 0.320312 0.707031; + size 0.300 0.800; + offset 0.000 -0.100; + advance 0.300; +}; +glyph 93 +{ + texcoords 0.382812 0.675781 0.390625 0.710938; + size 0.200 0.900; + offset 0.100 -0.100; + advance 0.400; +}; +glyph 94 +{ + texcoords 0.445312 0.695312 0.468750 0.707031; + size 0.600 0.300; + offset 0.100 0.400; + advance 0.800; +}; +glyph 95 +{ + texcoords 0.515625 0.671875 0.535156 0.675781; + size 0.500 0.100; + offset 0.000 -0.200; + advance 0.500; +}; +glyph 96 +{ + texcoords 0.593750 0.703125 0.601562 0.710938; + size 0.200 0.200; + offset 0.100 0.600; + advance 0.500; +}; +glyph 97 +{ + texcoords 0.656250 0.679688 0.675781 0.699219; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 98 +{ + texcoords 0.726562 0.679688 0.746094 0.710938; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 99 +{ + texcoords 0.800781 0.679688 0.816406 0.699219; + size 0.400 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 100 +{ + texcoords 0.867188 0.679688 0.886719 0.710938; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 101 +{ + texcoords 0.937500 0.679688 0.957031 0.699219; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 102 +{ + texcoords 0.027344 0.609375 0.042969 0.640625; + size 0.400 0.800; + offset 0.100 0.000; + advance 0.400; +}; +glyph 103 +{ + texcoords 0.093750 0.601562 0.113281 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 104 +{ + texcoords 0.164062 0.609375 0.183594 0.640625; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 105 +{ + texcoords 0.242188 0.609375 0.246094 0.640625; + size 0.100 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 106 +{ + texcoords 0.312500 0.601562 0.320312 0.640625; + size 0.200 1.000; + offset 0.000 -0.200; + advance 0.200; +}; +glyph 107 +{ + texcoords 0.375000 0.609375 0.394531 0.640625; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.500; +}; +glyph 108 +{ + texcoords 0.453125 0.609375 0.457031 0.640625; + size 0.100 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 109 +{ + texcoords 0.507812 0.609375 0.542969 0.628906; + size 0.900 0.500; + offset 0.100 0.000; + advance 1.000; +}; +glyph 110 +{ + texcoords 0.585938 0.609375 0.605469 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 111 +{ + texcoords 0.656250 0.609375 0.675781 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 112 +{ + texcoords 0.726562 0.601562 0.746094 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 113 +{ + texcoords 0.796875 0.601562 0.816406 0.628906; + size 0.500 0.700; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 114 +{ + texcoords 0.871094 0.609375 0.882812 0.628906; + size 0.300 0.500; + offset 0.100 0.000; + advance 0.400; +}; +glyph 115 +{ + texcoords 0.937500 0.609375 0.957031 0.628906; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 116 +{ + texcoords 0.027344 0.539062 0.042969 0.566406; + size 0.400 0.700; + offset 0.000 0.000; + advance 0.400; +}; +glyph 117 +{ + texcoords 0.093750 0.539062 0.113281 0.558594; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 118 +{ + texcoords 0.160156 0.539062 0.187500 0.558594; + size 0.700 0.500; + offset 0.000 0.000; + advance 0.600; +}; +glyph 119 +{ + texcoords 0.230469 0.539062 0.257812 0.558594; + size 0.700 0.500; + offset 0.100 0.000; + advance 0.800; +}; +glyph 120 +{ + texcoords 0.304688 0.539062 0.324219 0.558594; + size 0.500 0.500; + offset 0.100 0.000; + advance 0.600; +}; +glyph 121 +{ + texcoords 0.371094 0.531250 0.398438 0.558594; + size 0.700 0.700; + offset 0.000 -0.200; + advance 0.600; +}; +glyph 122 +{ + texcoords 0.449219 0.539062 0.464844 0.558594; + size 0.400 0.500; + offset 0.100 0.000; + advance 0.500; +}; +glyph 123 +{ + texcoords 0.519531 0.535156 0.535156 0.570312; + size 0.400 0.900; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 124 +{ + texcoords 0.593750 0.531250 0.597656 0.570312; + size 0.100 1.000; + offset 0.100 -0.200; + advance 0.300; +}; +glyph 125 +{ + texcoords 0.660156 0.535156 0.675781 0.570312; + size 0.400 0.900; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 126 +{ + texcoords 0.726562 0.546875 0.750000 0.558594; + size 0.600 0.300; + offset 0.100 0.200; + advance 0.800; +}; +glyph 160 +{ + texcoords 0.808594 0.539062 0.808594 0.539062; + size 0.000 0.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 161 +{ + texcoords 0.875000 0.539062 0.878906 0.566406; + size 0.100 0.700; + offset 0.200 0.000; + advance 0.400; +}; +glyph 162 +{ + texcoords 0.941406 0.535156 0.957031 0.562500; + size 0.400 0.700; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 163 +{ + texcoords 0.023438 0.468750 0.042969 0.496094; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 164 +{ + texcoords 0.093750 0.468750 0.117188 0.496094; + size 0.600 0.700; + offset 0.000 0.000; + advance 0.600; +}; +glyph 165 +{ + texcoords 0.164062 0.468750 0.183594 0.496094; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 166 +{ + texcoords 0.242188 0.460938 0.246094 0.496094; + size 0.100 0.900; + offset 0.100 -0.200; + advance 0.300; +}; +glyph 167 +{ + texcoords 0.308594 0.464844 0.324219 0.496094; + size 0.400 0.800; + offset 0.000 -0.100; + advance 0.500; +}; +glyph 168 +{ + texcoords 0.378906 0.492188 0.390625 0.496094; + size 0.300 0.100; + offset 0.100 0.600; + advance 0.500; +}; +glyph 169 +{ + texcoords 0.441406 0.468750 0.468750 0.496094; + size 0.700 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 170 +{ + texcoords 0.515625 0.472656 0.535156 0.496094; + size 0.500 0.600; + offset 0.100 0.100; + advance 0.500; +}; +glyph 171 +{ + texcoords 0.589844 0.472656 0.605469 0.488281; + size 0.400 0.400; + offset 0.100 0.100; + advance 0.600; +}; +glyph 172 +{ + texcoords 0.656250 0.472656 0.679688 0.484375; + size 0.600 0.300; + offset 0.100 0.100; + advance 0.800; +}; +glyph 173 +{ + texcoords 0.730469 0.476562 0.742188 0.480469; + size 0.300 0.100; + offset 0.100 0.200; + advance 0.400; +}; +glyph 174 +{ + texcoords 0.792969 0.468750 0.820312 0.496094; + size 0.700 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 175 +{ + texcoords 0.871094 0.492188 0.882812 0.496094; + size 0.300 0.100; + offset 0.100 0.600; + advance 0.500; +}; +glyph 176 +{ + texcoords 0.941406 0.484375 0.953125 0.496094; + size 0.300 0.300; + offset 0.100 0.400; + advance 0.500; +}; +glyph 177 +{ + texcoords 0.019531 0.398438 0.046875 0.421875; + size 0.700 0.600; + offset 0.100 0.000; + advance 0.800; +}; +glyph 178 +{ + texcoords 0.097656 0.410156 0.109375 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 179 +{ + texcoords 0.167969 0.410156 0.179688 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 180 +{ + texcoords 0.242188 0.421875 0.250000 0.429688; + size 0.200 0.200; + offset 0.200 0.600; + advance 0.500; +}; +glyph 181 +{ + texcoords 0.304688 0.390625 0.328125 0.417969; + size 0.600 0.700; + offset 0.100 -0.200; + advance 0.700; +}; +glyph 182 +{ + texcoords 0.375000 0.394531 0.394531 0.425781; + size 0.500 0.800; + offset 0.100 -0.100; + advance 0.600; +}; +glyph 183 +{ + texcoords 0.453125 0.410156 0.457031 0.414062; + size 0.100 0.100; + offset 0.100 0.300; + advance 0.300; +}; +glyph 184 +{ + texcoords 0.523438 0.390625 0.531250 0.398438; + size 0.200 0.200; + offset 0.100 -0.200; + advance 0.500; +}; +glyph 185 +{ + texcoords 0.589844 0.410156 0.601562 0.425781; + size 0.300 0.400; + offset 0.100 0.300; + advance 0.400; +}; +glyph 186 +{ + texcoords 0.660156 0.402344 0.675781 0.425781; + size 0.400 0.600; + offset 0.100 0.100; + advance 0.500; +}; +glyph 187 +{ + texcoords 0.730469 0.402344 0.746094 0.417969; + size 0.400 0.400; + offset 0.100 0.100; + advance 0.600; +}; +glyph 188 +{ + texcoords 0.789062 0.398438 0.824219 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 189 +{ + texcoords 0.859375 0.398438 0.894531 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 190 +{ + texcoords 0.929688 0.398438 0.964844 0.425781; + size 0.900 0.700; + offset 0.100 0.000; + advance 1.000; +}; +glyph 191 +{ + texcoords 0.027344 0.328125 0.042969 0.355469; + size 0.400 0.700; + offset 0.100 0.000; + advance 0.500; +}; +glyph 192 +{ + texcoords 0.089844 0.328125 0.117188 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 193 +{ + texcoords 0.160156 0.328125 0.187500 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 194 +{ + texcoords 0.230469 0.328125 0.257812 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 195 +{ + texcoords 0.300781 0.328125 0.328125 0.367188; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 196 +{ + texcoords 0.371094 0.328125 0.398438 0.363281; + size 0.700 0.900; + offset 0.000 0.000; + advance 0.700; +}; +glyph 197 +{ + texcoords 0.441406 0.328125 0.468750 0.363281; + size 0.700 0.900; + offset 0.000 0.000; + advance 0.700; +}; +glyph 198 +{ + texcoords 0.507812 0.328125 0.542969 0.355469; + size 0.900 0.700; + offset 0.000 0.000; + advance 1.000; +}; +glyph 199 +{ + texcoords 0.585938 0.320312 0.609375 0.355469; + size 0.600 0.900; + offset 0.100 -0.200; + advance 0.800; +}; +glyph 200 +{ + texcoords 0.656250 0.328125 0.675781 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 201 +{ + texcoords 0.726562 0.328125 0.746094 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 202 +{ + texcoords 0.796875 0.328125 0.816406 0.367188; + size 0.500 1.000; + offset 0.100 0.000; + advance 0.700; +}; +glyph 203 +{ + texcoords 0.867188 0.328125 0.886719 0.363281; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.700; +}; +glyph 204 +{ + texcoords 0.945312 0.328125 0.953125 0.367188; + size 0.200 1.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 205 +{ + texcoords 0.027344 0.257812 0.039062 0.296875; + size 0.300 1.000; + offset 0.100 0.000; + advance 0.300; +}; +glyph 206 +{ + texcoords 0.097656 0.257812 0.109375 0.296875; + size 0.300 1.000; + offset 0.000 0.000; + advance 0.300; +}; +glyph 207 +{ + texcoords 0.167969 0.257812 0.179688 0.292969; + size 0.300 0.900; + offset 0.000 0.000; + advance 0.300; +}; +glyph 208 +{ + texcoords 0.230469 0.257812 0.257812 0.285156; + size 0.700 0.700; + offset 0.000 0.000; + advance 0.800; +}; +glyph 209 +{ + texcoords 0.304688 0.257812 0.328125 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 210 +{ + texcoords 0.375000 0.257812 0.398438 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 211 +{ + texcoords 0.445312 0.257812 0.468750 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 212 +{ + texcoords 0.515625 0.257812 0.539062 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 213 +{ + texcoords 0.585938 0.257812 0.609375 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 214 +{ + texcoords 0.656250 0.257812 0.679688 0.292969; + size 0.600 0.900; + offset 0.100 0.000; + advance 0.800; +}; +glyph 215 +{ + texcoords 0.726562 0.257812 0.750000 0.281250; + size 0.600 0.600; + offset 0.100 0.000; + advance 0.800; +}; +glyph 216 +{ + texcoords 0.792969 0.253906 0.824219 0.289062; + size 0.800 0.900; + offset 0.000 -0.100; + advance 0.800; +}; +glyph 217 +{ + texcoords 0.867188 0.257812 0.890625 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 218 +{ + texcoords 0.937500 0.257812 0.960938 0.296875; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 219 +{ + texcoords 0.023438 0.187500 0.046875 0.226562; + size 0.600 1.000; + offset 0.100 0.000; + advance 0.800; +}; +glyph 220 +{ + texcoords 0.093750 0.187500 0.117188 0.222656; + size 0.600 0.900; + offset 0.100 0.000; + advance 0.800; +}; +glyph 221 +{ + texcoords 0.160156 0.187500 0.187500 0.226562; + size 0.700 1.000; + offset 0.000 0.000; + advance 0.700; +}; +glyph 222 +{ + texcoords 0.234375 0.187500 0.253906 0.214844; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.700; +}; +glyph 223 +{ + texcoords 0.304688 0.187500 0.324219 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 224 +{ + texcoords 0.375000 0.187500 0.394531 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 225 +{ + texcoords 0.445312 0.187500 0.464844 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 226 +{ + texcoords 0.515625 0.187500 0.535156 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 227 +{ + texcoords 0.585938 0.187500 0.605469 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 228 +{ + texcoords 0.656250 0.187500 0.675781 0.214844; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 229 +{ + texcoords 0.726562 0.187500 0.746094 0.222656; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.600; +}; +glyph 230 +{ + texcoords 0.789062 0.187500 0.824219 0.207031; + size 0.900 0.500; + offset 0.100 0.000; + advance 1.000; +}; +glyph 231 +{ + texcoords 0.871094 0.179688 0.886719 0.207031; + size 0.400 0.700; + offset 0.100 -0.200; + advance 0.500; +}; +glyph 232 +{ + texcoords 0.937500 0.187500 0.957031 0.218750; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 233 +{ + texcoords 0.023438 0.117188 0.042969 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 234 +{ + texcoords 0.093750 0.117188 0.113281 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 235 +{ + texcoords 0.164062 0.117188 0.183594 0.144531; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 236 +{ + texcoords 0.242188 0.117188 0.250000 0.148438; + size 0.200 0.800; + offset 0.000 0.000; + advance 0.200; +}; +glyph 237 +{ + texcoords 0.312500 0.117188 0.320312 0.148438; + size 0.200 0.800; + offset 0.100 0.000; + advance 0.200; +}; +glyph 238 +{ + texcoords 0.378906 0.117188 0.390625 0.148438; + size 0.300 0.800; + offset 0.000 0.000; + advance 0.200; +}; +glyph 239 +{ + texcoords 0.449219 0.117188 0.460938 0.144531; + size 0.300 0.700; + offset 0.000 0.000; + advance 0.200; +}; +glyph 240 +{ + texcoords 0.515625 0.117188 0.535156 0.152344; + size 0.500 0.900; + offset 0.100 0.000; + advance 0.600; +}; +glyph 241 +{ + texcoords 0.585938 0.117188 0.605469 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 242 +{ + texcoords 0.656250 0.117188 0.675781 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 243 +{ + texcoords 0.726562 0.117188 0.746094 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 244 +{ + texcoords 0.796875 0.117188 0.816406 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 245 +{ + texcoords 0.867188 0.117188 0.886719 0.148438; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 246 +{ + texcoords 0.937500 0.117188 0.957031 0.144531; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 247 +{ + texcoords 0.019531 0.050781 0.046875 0.070312; + size 0.700 0.500; + offset 0.100 0.100; + advance 0.800; +}; +glyph 248 +{ + texcoords 0.089844 0.042969 0.117188 0.070312; + size 0.700 0.700; + offset 0.000 -0.100; + advance 0.600; +}; +glyph 249 +{ + texcoords 0.164062 0.046875 0.183594 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 250 +{ + texcoords 0.234375 0.046875 0.253906 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 251 +{ + texcoords 0.304688 0.046875 0.324219 0.078125; + size 0.500 0.800; + offset 0.100 0.000; + advance 0.600; +}; +glyph 252 +{ + texcoords 0.375000 0.046875 0.394531 0.074219; + size 0.500 0.700; + offset 0.100 0.000; + advance 0.600; +}; +glyph 253 +{ + texcoords 0.441406 0.039062 0.468750 0.078125; + size 0.700 1.000; + offset 0.000 -0.200; + advance 0.600; +}; +glyph 254 +{ + texcoords 0.515625 0.039062 0.535156 0.078125; + size 0.500 1.000; + offset 0.100 -0.200; + advance 0.600; +}; +glyph 255 +{ + texcoords 0.582031 0.039062 0.609375 0.074219; + size 0.700 0.900; + offset 0.000 -0.200; + advance 0.600; +}; diff --git a/dejavu-10.png b/dejavu-10.png new file mode 100644 index 0000000000000000000000000000000000000000..1547a0bce09038db84d50d96159e42e88e801b73 GIT binary patch literal 6934 zcmaKxWmuHox`&6Z0YwCd?gojWhVD)oq(i!E=p02rr8{Qm7+P9DB&54RKoBK{mPXR! zfA4Fbea_kY>`(9d^uF(Uu5~@n@4nYtU2PR&LMlQ406?s!s`v~5!1%Mo0N`W)d0Yfr z9RL7SD{6{z&;aB?P9PFGmo^YS=QAT@^@_T`McEiSDh5}_CQos+C3r*RY;6su5>0Ix zi^bK_l_B`yE}z)T0h0D&TJPnt)|LMOB4_`B8CUOtq3A~)=^j+jd8%TF^{E}^u@G#& z(ihx$s#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825;LqrEuT#G=la0~ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Msp; + +// Application class. Because it's so much nicer than global variables. +class HelloWorld: public Msp::Application +{ +private: + // Objects for setting up an OpenGL window + Graphics::Display dpy; + Graphics::Window wnd; + Graphics::GLContext glc; + + // GLtk resources and widgets + GLtk::Resources res; + RefPtr root; + GLtk::Entry *ent_name; + GLtk::Label *lbl_hello; + + // Indicate our main class to the core library + static Application::RegApp reg; + +public: + HelloWorld(int, char **); +private: + virtual void tick(); + void show_hello(); +}; + +Application::RegApp HelloWorld::reg; + + +HelloWorld::HelloWorld(int, char **): + wnd(dpy, 200, 200), + glc(wnd) +{ + wnd.set_title("Hello World"); + wnd.signal_close.connect(sigc::bind(sigc::mem_fun(this, &HelloWorld::exit), 0)); + + // Load resources. This must be done before any widgets are created. + DataFile::load(res, "helloworld.gui"); + + // A Root receives input from a Graphics::Window and passes it on + root=new GLtk::Root(res, wnd); + + /* Container widgets will delete their contents upon destruction so we can + safely forget about the pointers after setting the widgets up. */ + + // Panels can be used to divide the window into sub-areas + GLtk::Panel *panel=new GLtk::Panel(res); + root->add(*panel); + panel->set_geometry(GLtk::Geometry(20, 20, 160, 160)); + + GLtk::Label *lbl; + // Prompts can be displayed with Labels + panel->add(*(lbl=new GLtk::Label(res, "Type your name below:"))); + lbl->set_geometry(GLtk::Geometry(10, 130, 140, 20)); + + // The user can type text into an Entry + panel->add(*(ent_name=new GLtk::Entry(res))); + ent_name->set_geometry(GLtk::Geometry(10, 110, 140, 20)); + + GLtk::Button *btn; + // Buttons can be wired to cause things to happen + panel->add(*(btn=new GLtk::Button(res, "Hello"))); + btn->set_geometry(GLtk::Geometry(10, 85, 140, 20)); + btn->signal_clicked.connect(sigc::mem_fun(this, &HelloWorld::show_hello)); + + // Another label for displaying some information + panel->add(*(lbl_hello=new GLtk::Label(res))); + lbl_hello->set_geometry(GLtk::Geometry(10, 65, 140, 20)); + + // The user might want to exit the program (*gasp*) + panel->add(*(btn=new GLtk::Button(res, "Exit"))); + btn->set_geometry(GLtk::Geometry(50, 10, 100, 20)); + btn->signal_clicked.connect(sigc::bind(sigc::mem_fun(this, &HelloWorld::exit), 0)); + + // Font rendering requires blending + GL::enable(GL::BLEND); + GL::blend_func(GL::SRC_ALPHA, GL::ONE_MINUS_SRC_ALPHA); + + // Done with setting things up, show the window! + wnd.show(); +} + +// This function will be called periodically from the main loop +void HelloWorld::tick() +{ + dpy.tick(); + + // Set up an orthogonal projection matching the root widget + GL::matrix_mode(GL::PROJECTION); + GL::load_identity(); + GL::ortho_bottomleft(200, 200); + GL::matrix_mode(GL::MODELVIEW); + GL::load_identity(); + + root->render(); + + glc.swap_buffers(); +} + +// Displays a greeting to the user +void HelloWorld::show_hello() +{ + lbl_hello->set_text("Hello, "+ent_name->get_text()+"!"); +} diff --git a/helloworld.gui b/helloworld.gui new file mode 100644 index 0000000..94188c7 --- /dev/null +++ b/helloworld.gui @@ -0,0 +1,106 @@ +/* $Id$ */ + +default_font "dejavu-10.font"; + +graphic "button_bg" +{ + texture "helloworld.png"; + slice 0 54 20 10; + border { left 3; right 3; top 3; bottom 3; }; +}; + +graphic "button_bg_pressed" +{ + texture "helloworld.png"; + slice 22 54 20 10; + border { left 3; right 3; top 3; bottom 3; }; +}; + +style "button" +{ + font_color 0.0 0.0 0.0; + + part + { + graphic NORMAL "button_bg"; + graphic ACTIVE "button_bg_pressed"; + }; + + special "text" + { + align 0.5 0.5; + fill 0.0 0.0; + margin { left 3; right 3; top 3; bottom 3; }; + }; +}; + +style "label" +{ + font_color 0.0 0.0 0.0; + + special "text" + { + align 0.5 0.5; + fill 0.0 0.0; + }; +}; + +graphic "entry_bg" +{ + texture "helloworld.png"; + slice 0 42 20 10; + border { left 3; right 3; top 3; bottom 3; }; +}; + +graphic "entry_cursor" +{ + texture "helloworld.png"; + slice 22 42 1 10; +}; + +style "entry" +{ + font_color 0.0 0.0 0.0; + + part + { + graphic NORMAL "entry_bg"; + }; + + special "text" + { + align 0.0 0.5; + fill 0.0 0.0; + margin { left 3; right 3; top 3; bottom 3; }; + }; + + special "cursor" + { + graphic FOCUS "entry_cursor"; + align 0.0 0.0; + fill 0.0 1.0; + margin { left 3; right 3; top 3; bottom 3; }; + }; +}; + +graphic "panel_bg" +{ + texture "helloworld.png"; + slice 0 20 20 20; + border { left 4; right 4; top 4; bottom 4; }; +}; + +style "panel" +{ + part + { + graphic NORMAL "panel_bg"; + }; + + special "children"; +}; + +style "root" +{ + special "children"; +}; diff --git a/helloworld.png b/helloworld.png new file mode 100644 index 0000000000000000000000000000000000000000..86b945a3cadcbe08114836954fa04a793e66ff62 GIT binary patch literal 558 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zUwFDWhE&{o zJL_y=vw=XXyrj9}tpLUyOz%P#So0c~9EcVDv5rkge1X{-YmoYB>E= z>Dh(q{cC0~6a2h-$|>dr>#_seiwhTR75ggfR3W9lbJwo8_3hUhl4Op@=2lb-O|oxH zlyJ!|dtaNlw$lzx`y<**e-IEe4Q-5EMQwZf= zmRWTxQXWDR8=%wJb{p<$* zbxYJ7Uh{0`W+;}La;MBI@GI#lw*1liy jkPb{5q6nE}-|YWJ|6B;`RqYAD1i;|w>gTe~DWM4fs?*=N literal 0 HcmV?d00001 -- 2.43.0