~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/PlacesSearchBar.h

Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PLACES_SEARCH_BAR_H
21
21
#define PLACES_SEARCH_BAR_H
22
22
 
 
23
#include <Nux/LayeredLayout.h>
 
24
#include <Nux/TextureArea.h>
23
25
#include <Nux/View.h>
24
 
#include <Nux/TextureArea.h>
 
26
 
25
27
#include <NuxGraphics/GraphicsEngine.h>
26
28
 
27
29
#include "Introspectable.h"
32
34
#include "PlaceEntry.h"
33
35
 
34
36
class PlacesView;
 
37
#include <gtk/gtk.h>
 
38
 
 
39
#include "IconTexture.h"
 
40
#include "StaticCairoText.h"
35
41
 
36
42
class PlacesSearchBar : public Introspectable, public nux::View
37
43
{
44
50
  virtual void Draw (nux::GraphicsEngine& GfxContext, bool force_draw);
45
51
  virtual void DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw);
46
52
 
47
 
  virtual void PreLayoutManagement ();
48
 
  virtual long PostLayoutManagement (long LayoutResult);
49
 
 
50
 
  void SetActiveEntry (PlaceEntry *entry, guint section_id, const char *search_string, bool ignore=false);
 
53
  void SetActiveEntry (PlaceEntry *entry,
 
54
                       guint       section_id,
 
55
                       const char *search_string,
 
56
                       bool        ignore=false);
51
57
 
52
58
  sigc::signal<void, const char *> search_changed;
53
59
  
63
69
  void EmitLiveSearch ();
64
70
 
65
71
  static bool OnLiveSearchTimeout (PlacesSearchBar *self);
 
72
  static void OnFontChanged (GObject *object, GParamSpec *pspec, PlacesSearchBar *self);
66
73
 
67
74
private:
68
75
  nux::AbstractPaintLayer *_bg_layer;
69
76
  nux::HLayout            *_layout;
 
77
  nux::LayeredLayout      *_layered_layout;
 
78
  nux::StaticCairoText    *_hint;
70
79
  nux::TextEntry          *_pango_entry;
71
80
  int _last_width;
72
81
  int _last_height;
74
83
  guint                    _live_search_timeout;
75
84
 
76
85
  friend class PlacesView;
 
86
  IconTexture             *_search_icon;
77
87
};
78
88
 
79
89
#endif