Fixed autotools stuff
[construo.git] / gui_directory_button.cxx
blob07cd4d56467edf02c581342e7c667c845c847a8f
1 // $Id: gui_directory_button.cxx,v 1.3 2003/01/08 23:14:59 grumbel Exp $
2 //
3 // Construo - A wire-frame construction gamee
4 // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #include "gui_file_manager.hxx"
21 #include "gui_directory_button.hxx"
23 GUIDirectoryButton::GUIDirectoryButton (const std::string& arg_filename)
24 : GUIFileButton (arg_filename)
28 GUIDirectoryButton::~GUIDirectoryButton ()
32 void
33 GUIDirectoryButton::draw (GraphicContext* parent_gc)
35 //std::cout << "GUIDirectoryButton: " << filename << std::endl;
36 parent_gc->draw_fill_rect (x_pos, y_pos,
37 x_pos + width, y_pos + height,
38 Color (0xBB0000FF));
40 parent_gc->draw_string (x_pos + 40, y_pos + 20, "..:: Directory ::..");
41 parent_gc->draw_string (x_pos + 30, y_pos + 40, filename);
43 if (mouse_over)
44 parent_gc->draw_rect (x_pos, y_pos,
45 x_pos + width, y_pos + height,
46 Color (0xFFFFFFFF));
47 else
48 parent_gc->draw_rect (x_pos, y_pos,
49 x_pos + width, y_pos + height,
50 Color (0xFF0000FF));
53 void
54 GUIDirectoryButton::on_click()
56 std::cout << "Click on GUIDirectoryButton detected" << std::endl;
57 GUIFileManager::instance()->open_directory(filename);
60 /* EOF */