Skip navigation.
Home
l'art pour l'art

TOAD

TOAD: Lambda functions and closures are now part of C++0x

See all entries for

I just read that Lambda functions and closures are now part of C++0x. Once The GNU C++ Compiler supports these, I will redesign the current CPP+Signal'n Slots based closure syntax.

This means that

TCLOSURE2(
  slider,sigChanged,
  _this, this,
  _slider, slider,
  _this->setValue(_slider->getValue());
)

is going to look like

slider->sigChanged->connect([] { this->setValue(slider->getValue()); });

in the future.

TOAD: TModelLayout

See all entries for

Whew! After letting TOAD rest for about six months, there are finally some new commits. TModelLayout is now able to restore itself from a file and I've fixed some minor issues with TPen::setFont and vertical scrolling in TTextArea.

TOAD: TModelLayout

See all entries for

I began implementing the new dialog editor, TModelLayout in examples/modellayout/. The screen shot below shows the layout editor on the left. On the top are the usual drawing tools. At the bottom are two lists. The first shows the models registered for the dialog, the second shows the widgets which can handle the selected model. The Add Widget button will add the selected widget to the dialog window, where it can be moved and resized with the Select Tool. On the right you see a simple dialog which I created with the layout editor.
(To start the layout editor, the program on the right has to be compiled and run with the option '--layout-editor' as usual.)

class TMyDialog: public TDialog
{
    TIntegerModel age;
    TFloatModel weight;
    TTextModel name;
    TBoolModel married;
  public:
    TMyDialog(TWindow *p, const string &t);
};
 
TMyDialog::TMyDialog(TWindow *p, const string &t): TDialog(p, t)
{
  TModelLayout *layout = new TModelLayout("TDialogLayout.atv");
  layout->addModel(&age,     "age");
  layout->addModel(&weight,  "weight");
  layout->addModel(&name,    "name");
  layout->addModel(&married, "married");
  setLayout(layout);
}

While I wrote the new layout class, I finally decided that the TTable classes needs to be improved as it is really no fun to use them.
I have also incorporated more code for the Cocoa (Mac OS X) port. It is still unusable but the compiles now.

TOAD: floating point screen coordinates

See all entries for

The last commit to the TOAD repository is quite a major one and it might break a lot: I've switched the screen coordinates to floating point because

  1. it is not 1995 anymore,
  2. Cairo (X11) and Cocoa (Mac OS X) are also using floating point coordinates and
  3. a graphic tablet can deliver more than just a single integer per axis for a single point.

The changes (there are more) is also destined towards a potential native Mac OS X port of TOAD. In fact, there is already some Objective-C code in the source.

TOAD: TOAD C++ GUI Library for Cocoa: Halted; Fischland: Running

See all entries for

I was stuck with some problems with the Cocoa port of TOAD for sometime, which I started to speed up Fischland, my 2D vector graphics program to draw comics.

Yesterday, being eager to draw something, I installed trial versions of Anime Studio™ and Adobe Illustrator™ to find out if they are an alternative. An alternative of investing money instead of time.