OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 #include <string> | 10 #include <string> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // As above, but a convenience method for configuring dialog size. | 86 // As above, but a convenience method for configuring dialog size. |
87 // |width_id| and |height_id| are resource IDs for the size. If either of these | 87 // |width_id| and |height_id| are resource IDs for the size. If either of these |
88 // are set to -1, the respective size will be set to the widget default. | 88 // are set to -1, the respective size will be set to the widget default. |
89 // |resizable| also controls whether the dialog will be resizable | 89 // |resizable| also controls whether the dialog will be resizable |
90 // (this info is also necessary for getting the width-setting code | 90 // (this info is also necessary for getting the width-setting code |
91 // right). | 91 // right). |
92 void SetWindowSizeFromResources(GtkWindow* window, | 92 void SetWindowSizeFromResources(GtkWindow* window, |
93 int width_id, int height_id, bool resizable); | 93 int width_id, int height_id, bool resizable); |
94 | 94 |
95 // Places |window| approximately over center of |parent|, it also moves window | |
96 // to parent's desktop. Use this only for non-modal dialogs, such as the | |
97 // options window and content settings window; otherwise you should be using | |
98 // transient_for. | |
99 void CenterOverWindow(GtkWindow* window, GtkWindow* parent); | |
100 | |
101 // Puts all browser windows in one window group; this will make any dialog | 95 // Puts all browser windows in one window group; this will make any dialog |
102 // spawned app modal. | 96 // spawned app modal. |
103 void MakeAppModalWindowGroup(); | 97 void MakeAppModalWindowGroup(); |
104 | 98 |
105 // Called after an app modal dialog that used MakeAppModalWindowGroup() was | 99 // Called after an app modal dialog that used MakeAppModalWindowGroup() was |
106 // dismissed. Returns each browser window to its own window group. | 100 // dismissed. Returns each browser window to its own window group. |
107 void AppModalDismissedUngroupWindows(); | 101 void AppModalDismissedUngroupWindows(); |
108 | 102 |
109 // Remove all children from this container. | 103 // Remove all children from this container. |
110 void RemoveAllChildren(GtkWidget* container); | 104 void RemoveAllChildren(GtkWidget* container); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 void ApplyMessageDialogQuirks(GtkWidget* dialog); | 322 void ApplyMessageDialogQuirks(GtkWidget* dialog); |
329 | 323 |
330 // Performs Cut/Copy/Paste operation on the |window|. | 324 // Performs Cut/Copy/Paste operation on the |window|. |
331 void DoCut(BrowserWindow* window); | 325 void DoCut(BrowserWindow* window); |
332 void DoCopy(BrowserWindow* window); | 326 void DoCopy(BrowserWindow* window); |
333 void DoPaste(BrowserWindow* window); | 327 void DoPaste(BrowserWindow* window); |
334 | 328 |
335 } // namespace gtk_util | 329 } // namespace gtk_util |
336 | 330 |
337 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 331 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
OLD | NEW |