>
> > Hi all,
> > I want multilingual button labels....My code produces=20
> > some haphazard text......Please help...
>
> Which version of fltk are you using?
>
> Fltk-1.1.x really only supports basic ASCII text planes.
>
> With fltk-1.3, or fltk-2, labels encoded as UTF8 should just work, in so
> far as rendering the specified glyphs.
>
> However, if you also need complex text layout, you will need to provide
> your own text-compositing and layout mechanisms to generate the correct
> sequence of glyphs. (Fltk only deals with drawing the glyphs, not with
> the complex interactions that occur in many languages...)
>
> If you only need fixed text for buttons, this should be easy enough.
>
>
>
>
> SELEX Sensors and Airborne Systems Limited
> Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS=
> 14 3EL
> A company registered in England & Wales. Company no. 02426132
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>
I am using fltk-1.3. I guess I don't know the trick you wnat me to do...
Here's my code:
#include<FL/Fl.H>
#include<FL/Fl_Window.H>
#include<Fl/Fl_Button.H>
#include<iostream>
#include<string.h>
using namespace std;
class MainWindow : public Fl_Window
{
private:
Fl_Button btnDownload;
Fl_Button btnAttendence;
Fl_Button btnMeasurement;
Fl_Button btnUpload;
public:
MainWindow(int width, int height, string appName);
static void cb_btnDownload (Fl_Widget *w, void *data);
static void cb_btnAttendence (Fl_Widget *w, void *data);
static void cb_btnMeasurement (Fl_Widget *w, void *data);
static void cb_btnUpload (Fl_Widget *w, void *data);
};
MainWindow::MainWindow(int width, int height, string appName):
Fl_Window(width, height, appName.c_str()),
btnDownload(40, 40, 170, 30),
btnAttendence(40, 90, 170, 30),
btnMeasurement(40, 140, 170, 30),
btnUpload(40, 190, 170, 30)
{
color(FL_BLUE);
begin();
btnDownload.label("डाà¤à¤¨à¤²à¥à¤¡");
btnDownload.callback(cb_btnDownload);
btnAttendence.label("à¤à¤ªà¤¸à¥à¤¥à¤¿à¤¤à¤¿");
btnAttendence.callback(cb_btnAttendence);
btnMeasurement.label("à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤à¤¤à¤¿");
btnMeasurement.callback(cb_btnMeasurement);
btnUpload.label("à¤
पलà¥à¤¡");
btnUpload.callback(cb_btnUpload);
end();
}
void MainWindow::cb_btnDownload(Fl_Widget *w, void *data)
{
printf("Downloading\n");
}
void MainWindow::cb_btnAttendence(Fl_Widget *w, void *data)
{
cout<<"Taking attendence.."<<endl;
}
void MainWindow::cb_btnMeasurement(Fl_Widget *w, void *data)
{
cout<<"Taking Measurements.."<<endl;
}
void MainWindow::cb_btnUpload(Fl_Widget *w, void *data)
{
cout<<"Uploading.."<<endl;
}
int main(int argc, char **argv)
{
Fl::visual(FL_DOUBLE|FL_INDEX);
MainWindow window(240, 270, "emuster");
window.show();
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk