Skip to content
David Capello edited this page Mar 30, 2015 · 16 revisions

What is Vaca?

Vaca means Visual Application Components Abstraction, it's an experimental library to program applications for Windows using C++ language and classes, with a simple OOP approach (RAII idiom, STL, signals/slots). It's a wrapper for the Win32 API, but with additional functionality like dockable tool bars and layout managers.

What does it mean that Vaca is experimental?

The current API is unstable, it can change in the future. Also you are encourage to help us with new ideas to improve the library design. Basically you should use this library to develop test programs or small utilities.

Examples

Here some examples of what you can do with Vaca.

Features

  • Native Windows controls.
  • Layout managers: Automatic repositioning of widgets.
  • Usage of signals/slots to hook events (without special preprocessors).
  • Unicode support.
  • Multi-threading support.
  • Dockable bars implementation from scratch.
    • Note: Last working version of dockable bars is v0.0.7, this feature is temporarily broken in master branch.
  • Multiple Document Interface support.
  • Scintilla wrapper.

API Example

Here a simple Hello World in Vaca:

#include <vaca/vaca.h>

using namespace vaca;

class MainFrame : public Frame
{
  Label label;
public:
  MainFrame() : Frame("Vaca Example")
              , label("Hello World!", this) {
    setLayout(new ClientLayout);
    setSize(getPreferredSize());
  }
};

int VACA_MAIN()
{
  Application app;
  MainFrame frm;
  frm.setVisible(true);
  app.run();
  return 0;
}

This is a variation, there is no need to extend the Frame class:

#include <vaca/vaca.h>

using namespace vaca;

int VACA_MAIN()
{
  Application app;
  Frame frm("Vaca Example");
  Label label("Hello World!", &frm);
  frm.setLayout(new ClientLayout);
  frm.setSize(frm.getPreferredSize());
  frm.setVisible(true);
  app.run();
  return 0;
}
Clone this wiki locally