]>
Dogcows Code - chaz/openbox/blob - otk/application.cc
f101a5a3f7e6ebf1f74f22afa1b95ac31770b98e
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "application.hh"
8 #include "eventhandler.hh"
11 #include "property.hh"
23 Application::Application(int argc
, char **argv
)
32 const ScreenInfo
*s_info
= _display
.screenInfo(DefaultScreen(*_display
));
35 Property::initialize();
36 _img_ctrl
= new ImageControl(s_info
, True
, 4, 5, 200);
37 _style_conf
= new Configuration(False
);
38 _style
= new Style(_img_ctrl
);
43 Application::~Application()
51 void Application::loadStyle(void)
53 // find the style name as a property
54 std::string style
= "/usr/local/share/openbox/styles/artwiz";
55 _style_conf
->setFile(style
);
56 if (!_style_conf
->load()) {
57 std::cerr
<< "ERROR: Unable to load style \"" << style
<< "\".\n";
60 _style
->load(*_style_conf
);
63 void Application::run(void)
65 if (_appwidget_count
<= 0) {
66 std::cerr
<< "ERROR: No main widgets exist. You must create and show() " <<
67 "an AppWidget for the Application before calling " <<
68 "Application::run().\n";
72 while (_appwidget_count
> 0) {
74 Timer::dispatchTimers(); // fire pending events
This page took 0.037657 seconds and 4 git commands to generate.