Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Side by Side Diff: chrome/browser/gtk/find_bar_gtk.h

Issue 100224: GTK: give the findbox curvy edges.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/find_bar_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_FIND_BAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_FIND_BAR_GTK_H_
6 #define CHROME_BROWSER_GTK_FIND_BAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_FIND_BAR_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // by hiding and showing it. 65 // by hiding and showing it.
66 void AssureOnTop(); 66 void AssureOnTop();
67 67
68 private: 68 private:
69 void InitWidgets(); 69 void InitWidgets();
70 70
71 // Callback for previous, next, and close button. 71 // Callback for previous, next, and close button.
72 static void OnButtonPressed(GtkWidget* button, FindBarGtk* find_bar); 72 static void OnButtonPressed(GtkWidget* button, FindBarGtk* find_bar);
73 73
74 // Called when |fixed_| changes sizes. Used to position |container_|. 74 // Called when |fixed_| changes sizes. Used to position |container_|.
75 static void OnSizeAllocate(GtkWidget* fixed, 75 static void OnFixedSizeAllocate(GtkWidget* fixed,
76 GtkAllocation* allocation, 76 GtkAllocation* allocation,
77 FindBarGtk* container_); 77 FindBarGtk* findbar);
78
79 // Called when |container_| is allocated.
80 static void OnContainerSizeAllocate(GtkWidget* container,
81 GtkAllocation* allocation,
82 FindBarGtk* findbar);
83
78 84
79 // GtkFixed containing the find bar widgets. 85 // GtkFixed containing the find bar widgets.
80 OwnedWidgetGtk fixed_; 86 OwnedWidgetGtk fixed_;
81 87
82 // An event box which shows the background for |fixed_|. We could just set 88 // An event box which shows the background for |fixed_|. We could just set
83 // |fixed_| to have its own GdkWindow and draw the background directly, but 89 // |fixed_| to have its own GdkWindow and draw the background directly, but
84 // then |container_| would clip to the bounds of |fixed_|. 90 // then |container_| would clip to the bounds of |fixed_|.
85 GtkWidget* border_; 91 GtkWidget* border_;
86 92
87 // A GtkAlignment which holds what the user perceives as the findbar (the text 93 // A GtkAlignment which holds what the user perceives as the findbar (the text
88 // field, the buttons, etc.). 94 // field, the buttons, etc.).
89 GtkWidget* container_; 95 GtkWidget* container_;
90 96
97 // This will be set to true after ContourWidget() has been called so we don't
98 // call it twice.
99 bool container_shaped_;
100
91 // The widget where text is entered. 101 // The widget where text is entered.
92 GtkWidget* find_text_; 102 GtkWidget* find_text_;
93 103
94 // The next and previous match buttons. 104 // The next and previous match buttons.
95 scoped_ptr<CustomDrawButton> find_previous_button_; 105 scoped_ptr<CustomDrawButton> find_previous_button_;
96 scoped_ptr<CustomDrawButton> find_next_button_; 106 scoped_ptr<CustomDrawButton> find_next_button_;
97 107
98 // The X to close the find bar. 108 // The X to close the find bar.
99 scoped_ptr<CustomDrawButton> close_button_; 109 scoped_ptr<CustomDrawButton> close_button_;
100 110
101 // Pointer back to the owning controller. 111 // Pointer back to the owning controller.
102 FindBarController* find_bar_controller_; 112 FindBarController* find_bar_controller_;
103 113
104 DISALLOW_COPY_AND_ASSIGN(FindBarGtk); 114 DISALLOW_COPY_AND_ASSIGN(FindBarGtk);
105 }; 115 };
106 116
107 #endif // CHROME_BROWSER_GTK_FIND_BAR_GTK_H_ 117 #endif // CHROME_BROWSER_GTK_FIND_BAR_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/find_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698