OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_UTILITIES_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_UTILITIES_H_ | |
7 #pragma once | |
8 | |
9 #import <Cocoa/Cocoa.h> | |
10 | |
11 #pragma mark InfoBarUtilities helper functions. | |
Avi (use Gerrit)
2012/04/28 16:55:37
1) We don't use pragmas. Use comments.
2) This is
| |
12 namespace InfoBarUtilities { | |
13 | |
14 // Move the |toMove| view |spacing| pixels before/after the |anchor| view. | |
15 // |after| signifies the side of |anchor| on which to place |toMove|. | |
16 void MoveControl(NSView* anchor, NSView* toMove, int spacing, bool after); | |
17 | |
18 // Vertically center |toMove| in its container. | |
19 void VerticallyCenterView(NSView *toMove); | |
20 | |
21 // Check that the control |before| is ordered visually before the |after| | |
22 // control. | |
23 // Also, check that there is space between them. | |
Avi (use Gerrit)
2012/04/28 16:55:37
Combine with line above.
| |
24 bool VerifyControlOrderAndSpacing(id before, id after); | |
25 | |
26 // Creates a label control in the style we need for the infobar's labels | |
27 // within |bounds|. | |
28 NSTextField* CreateLabel(NSRect bounds); | |
29 | |
30 // Adds an item with the specified properties to |menu|. | |
31 void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title, | |
32 int tag, bool enabled, bool checked); | |
33 | |
34 } // namespace InfoBarUtilities | |
35 | |
36 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_UTILITIES_H_ | |
OLD | NEW |