Back to index

unity  6.0.0
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions
unity::hud::AbstractView Class Reference

#include <HudAbstractView.h>

Inheritance diagram for unity::hud::AbstractView:
Inheritance graph
[legend]
Collaboration diagram for unity::hud::AbstractView:
Collaboration graph
[legend]

List of all members.

Public Types

typedef nux::ObjectPtr
< AbstractView
Ptr
typedef std::list
< Introspectable * > 
IntrospectableList

Public Member Functions

 AbstractView ()
virtual void AboutToShow ()=0
virtual void AboutToHide ()=0
virtual void Relayout ()=0
virtual void ResetToDefault ()=0
virtual void SearchFinished ()=0
virtual void SetIcon (std::string const &icon_name, unsigned int tile_size, unsigned int size, unsigned int padding)=0
virtual void SetQueries (Hud::Queries queries)=0
virtual void SetWindowGeometry (nux::Geometry const &absolute_geo, nux::Geometry const &geo)=0
virtual void ShowEmbeddedIcon (bool show)=0
virtual nux::View * default_focus () const =0
GVariant * Introspect ()
virtual std::string GetName () const =0
void AddChild (Introspectable *child)
void RemoveChild (Introspectable *child)
virtual void AddProperties (GVariantBuilder *builder)=0
virtual IntrospectableList GetIntrospectableChildren ()
guint64 GetIntrospectionId () const

Public Attributes

sigc::signal< void, std::string > search_changed
sigc::signal< void, std::string > search_activated
sigc::signal< void, Query::Ptrquery_activated
sigc::signal< void, Query::Ptrquery_selected

Protected Member Functions

virtual std::string GetChildsName () const
 Please don't override this unless you really need to. The only valid reason is if you have a property that simply must be called 'Children'.

Private Member Functions

 NUX_DECLARE_OBJECT_TYPE (AbstractView, nux::View)

Detailed Description

Definition at line 36 of file HudAbstractView.h.


Member Typedef Documentation

Definition at line 34 of file Introspectable.h.

Reimplemented in unity::hud::View.

Definition at line 40 of file HudAbstractView.h.


Constructor & Destructor Documentation

Definition at line 28 of file HudAbstractView.cpp.

  : nux::View(NUX_TRACKER_LOCATION)
{}

Member Function Documentation

virtual void unity::hud::AbstractView::AboutToHide ( ) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::AboutToShow ( ) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

Definition at line 78 of file Introspectable.cpp.

{
  _children.push_back(child);
  child->_parents.push_back(this);
}

Here is the caller graph for this function:

virtual void unity::debug::Introspectable::AddProperties ( GVariantBuilder *  builder) [pure virtual, inherited]
virtual nux::View* unity::hud::AbstractView::default_focus ( ) const [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

std::string unity::debug::Introspectable::GetChildsName ( ) const [protected, virtual, inherited]

Please don't override this unless you really need to. The only valid reason is if you have a property that simply must be called 'Children'.

Definition at line 92 of file Introspectable.cpp.

{
  return "Children";
}

Here is the caller graph for this function:

Introspectable::IntrospectableList unity::debug::Introspectable::GetIntrospectableChildren ( ) [virtual, inherited]

Reimplemented in unity::hud::View, unity::launcher::LauncherModel, unity::QuicklistView, and unity::dash::ResultView.

Definition at line 41 of file Introspectable.cpp.

{
  return _children;
}

Here is the caller graph for this function:

guint64 unity::debug::Introspectable::GetIntrospectionId ( ) const [inherited]

Definition at line 97 of file Introspectable.cpp.

{
  return _id;
}

Here is the caller graph for this function:

virtual std::string unity::debug::Introspectable::GetName ( ) const [pure virtual, inherited]

Implemented in unity::WindowButton, unity::launcher::LauncherIcon, unity::UnityScreen, WindowManager, unity::launcher::Launcher, unity::dash::DashView, unity::dash::LensView, unity::switcher::Controller, unity::SearchBar, unity::launcher::BamfLauncherIcon, unity::QuicklistMenuItem, unity::PanelIndicatorEntryView, unity::launcher::LauncherModel, unity::switcher::SwitcherModel, unity::PlacesGroup, unity::hud::View, unity::launcher::Controller, unity::dash::FilterExpanderLabel, unity::PanelIndicatorsView, unity::dash::LensBar, unity::QuicklistView, unity::switcher::SwitcherView, unity::PanelView, unity::LauncherEntryRemote, unity::hud::Controller, unity::IconTexture, unity::hud::HudButton, unity::PanelMenuView, unity::WindowButtons, unity::dash::Controller, unity::dash::ResultView, unity::shortcut::View, unity::shortcut::Controller, unity::dash::FilterBar, unity::ui::UnityWindowView, unity::launcher::MockLauncherIcon, unity::panel::Controller, unity::PanelTitlebarGrabArea, unity::SearchBarSpinner, unity::dash::LensBarIcon, unity::PanelTray, unity::Tooltip, unity::launcher::BFBLauncherIcon, unity::launcher::DesktopLauncherIcon, unity::launcher::SimpleLauncherIcon, unity::launcher::TrashLauncherIcon, unity::launcher::HudLauncherIcon, unity::launcher::DeviceLauncherIcon, unity::launcher::SoftwareCenterLauncherIcon, unity::hud::Icon, unity::launcher::SingleMonitorLauncherIcon, unity::launcher::SpacerLauncherIcon, unity::debug::ResultWrapper, and MockIntrospectable.

Here is the caller graph for this function:

GVariant * unity::debug::Introspectable::Introspect ( ) [inherited]

Definition at line 47 of file Introspectable.cpp.

{
  GVariantBuilder  builder;
  GVariantBuilder  child_builder;
  gint             n_children = 0;

  g_variant_builder_init(&builder, G_VARIANT_TYPE("a{sv}"));
  g_variant_builder_add(&builder, "{sv}", "id", g_variant_new_uint64(_id));

  AddProperties(&builder);

  g_variant_builder_init(&child_builder, G_VARIANT_TYPE("as"));

  auto children = GetIntrospectableChildren();
  for (auto it = children.begin(); it != children.end(); it++)
  {
    if ((*it)->GetName() != "")
    {
      g_variant_builder_add(&child_builder, "s", (*it)->GetName().c_str());
      n_children++;
    }
  }

  GVariant* child_results = g_variant_builder_end(&child_builder);

  if (n_children > 0)
    g_variant_builder_add(&builder, "{sv}", GetChildsName().c_str(), child_results);
  return g_variant_builder_end(&builder);
}

Here is the call graph for this function:

virtual void unity::hud::AbstractView::Relayout ( ) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

Definition at line 85 of file Introspectable.cpp.

{
  _children.remove(child);
  child->_parents.remove(this);
}

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::ResetToDefault ( ) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::SearchFinished ( ) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::SetIcon ( std::string const &  icon_name,
unsigned int  tile_size,
unsigned int  size,
unsigned int  padding 
) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::SetQueries ( Hud::Queries  queries) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::SetWindowGeometry ( nux::Geometry const &  absolute_geo,
nux::Geometry const &  geo 
) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:

virtual void unity::hud::AbstractView::ShowEmbeddedIcon ( bool  show) [pure virtual]

Implemented in unity::hud::View.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 59 of file HudAbstractView.h.

Definition at line 60 of file HudAbstractView.h.

sigc::signal<void, std::string> unity::hud::AbstractView::search_activated

Definition at line 58 of file HudAbstractView.h.

sigc::signal<void, std::string> unity::hud::AbstractView::search_changed

Definition at line 57 of file HudAbstractView.h.


The documentation for this class was generated from the following files: