blob: d65f84020c2774c8ae191b9d5c93eaa2f934e3a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_
#define CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_
#include <gtk/gtk.h>
#include "base/scoped_ptr.h"
class BaseDownloadItemModel;
class NineBox;
class DownloadItemGtk {
public:
// DownloadItemGtk takes ownership of |download_item_model|.
DownloadItemGtk(BaseDownloadItemModel* download_item_model,
GtkWidget* parent_shelf);
// We put |hbox_| in |parent_shelf| and rely on |parent_shelf| recursively
// destroying its children. Hence we do nothing in the destructor.
~DownloadItemGtk();
private:
static void InitNineBoxes();
static gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e,
DownloadItemGtk* download_item);
// Nineboxes for the body area.
static NineBox* body_nine_box_normal_;
static NineBox* body_nine_box_prelight_;
static NineBox* body_nine_box_active_;
// Nineboxes for the menu button.
static NineBox* menu_nine_box_normal_;
static NineBox* menu_nine_box_prelight_;
static NineBox* menu_nine_box_active_;
// The widget that contains the body and menu dropdown.
GtkWidget* hbox_;
// The widget that contains the name of the download and the progress
// animation.
GtkWidget* body_;
// The widget that creates a dropdown menu when pressed.
GtkWidget* menu_button_;
// The download item model we represent.
scoped_ptr<BaseDownloadItemModel> download_model_;
// The shelf we show ourselves on. We do not own this widget.
GtkWidget* parent_shelf_;
};
#endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_GTK_H_
|