/*
* Anchor.cpp
* Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2009/10/13
#include <sol\ApplicationView.h>
#include <sol\Anchor.h>
#include "resource.h"
namespace SOL {
class AppView :public ApplicationView {
private:
Anchor link[10];
int count;
public:
/**
* Constructor
*/
AppView(Application& applet, const TCHAR* name, Args& args)
:ApplicationView(applet, name, args)
{
count = 0;
Args ar;
ar.set(XmNx, 10);
ar.set(XmNy, 10);
ar.set(XmNurl, _T("http://www.microsoft.com/"));
link[count++].create(this, _T("Microsoft Corporation"), ar);
ar.reset();
ar.set(XmNx, 10);
ar.set(XmNy, 10+40*count);
ar.set(XmNurl, _T("http://www.google.com/"));
link[count++].create(this, _T("Google"), ar);
ar.reset();
ar.set(XmNx, 10);
ar.set(XmNy, 10+40*count);
ar.set(XmNurl, _T("http://www.yahoo.com/"));
link[count++].create(this, _T("Yahoo"), ar);
ar.reset();
ar.set(XmNx, 10);
ar.set(XmNy, 10+40*count);
ar.set(XmNurl, _T("http://www.apple.com/"));
link[count++].create(this, _T("Apple Computer"), ar);
ar.reset();
ar.set(XmNx, 10);
ar.set(XmNy, 10+40*count);
ar.set(XmNurl, _T("http://www.asahi.com/"));
link[count++].create(this, _T("Asahi Shimbun"), ar);
ar.reset();
ar.set(XmNx, 10);
ar.set(XmNy, 10+40*count);
ar.set(XmNurl, _T("http://www.antillia.com/"));
link[count++].create(this, _T("Antilia.com"), ar);
addCallback(XmNmenuCallback, ID_EXIT, this,
(Callback)&AppView::exit, NULL);
restorePlacement();
}
};
}
//
void Main(int argc, TCHAR** argv)
{
const String appClass = "Anchor";
try {
Application applet(appClass, argc, argv);
Args args;
args.set(XmNclassStyle, NO_REDRAW);
AppView appview(applet, appClass, args);
appview.realize();
applet.run();
} catch (...) {
}
}
|