Back to index

unity  6.0.0
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
unity::panel::Controller Class Reference

#include <PanelController.h>

Inheritance diagram for unity::panel::Controller:
Inheritance graph
[legend]
Collaboration diagram for unity::panel::Controller:
Collaboration graph
[legend]

List of all members.

Classes

class  Impl

Public Types

typedef std::shared_ptr
< Controller
Ptr
typedef std::list
< Introspectable * > 
IntrospectableList

Public Member Functions

 Controller ()
 ~Controller ()
void FirstMenuShow ()
void QueueRedraw ()
std::vector< Window > GetTrayXids () const
std::vector< nux::View * > GetPanelViews () const
std::vector< nux::Geometry > GetGeometries () const
void SetOpacity (float opacity)
void SetOpacityMaximizedToggle (bool enabled)
void SetMenuShowTimings (int fadein, int fadeout, int discovery, int discovery_fadein, int discovery_fadeout)
float opacity () const
std::string GetName () const
void AddProperties (GVariantBuilder *builder)
GVariant * Introspect ()
void AddChild (Introspectable *child)
void RemoveChild (Introspectable *child)
virtual IntrospectableList GetIntrospectableChildren ()
guint64 GetIntrospectionId () const

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

void OnScreenChanged (int primary_monitor, std::vector< nux::Geometry > &monitors)

Private Attributes

Implpimpl

Detailed Description

Definition at line 32 of file PanelController.h.


Member Typedef Documentation

Definition at line 34 of file Introspectable.h.

typedef std::shared_ptr<Controller> unity::panel::Controller::Ptr

Definition at line 35 of file PanelController.h.


Constructor & Destructor Documentation

Definition at line 294 of file PanelController.cpp.

  : pimpl(new Impl())
{
  UScreen* screen = UScreen::GetDefault();
  screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged));
  OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());
}

Here is the call graph for this function:

Definition at line 302 of file PanelController.cpp.

{
  delete pimpl;
}

Member Function Documentation

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:

void unity::panel::Controller::AddProperties ( GVariantBuilder *  builder) [virtual]

Implements unity::debug::Introspectable.

Definition at line 358 of file PanelController.cpp.

{
  variant::BuilderWrapper(builder)
    .add("opacity", pimpl->opacity());
}

Here is the call graph for this function:

Definition at line 307 of file PanelController.cpp.

Here is the call graph for this function:

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:

std::vector< nux::Geometry > unity::panel::Controller::GetGeometries ( ) const

Definition at line 343 of file PanelController.cpp.

{
  return pimpl->GetGeometries();
}

Here is the call 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:

std::string unity::panel::Controller::GetName ( ) const [virtual]

Implements unity::debug::Introspectable.

Definition at line 353 of file PanelController.cpp.

{
  return "PanelController";
}
std::vector< nux::View * > unity::panel::Controller::GetPanelViews ( ) const

Definition at line 338 of file PanelController.cpp.

{
  return pimpl->GetPanelViews();
}

Here is the call graph for this function:

std::vector< Window > unity::panel::Controller::GetTrayXids ( ) const

Definition at line 333 of file PanelController.cpp.

{
  return pimpl->GetTrayXids();
}

Here is the call 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:

void unity::panel::Controller::OnScreenChanged ( int  primary_monitor,
std::vector< nux::Geometry > &  monitors 
) [private]

Definition at line 364 of file PanelController.cpp.

{
  pimpl->OnScreenChanged(primary_monitor, monitors, this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 348 of file PanelController.cpp.

{
  return pimpl->opacity();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 328 of file PanelController.cpp.

Here is the call 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:

void unity::panel::Controller::SetMenuShowTimings ( int  fadein,
int  fadeout,
int  discovery,
int  discovery_fadein,
int  discovery_fadeout 
)

Definition at line 322 of file PanelController.cpp.

{
  pimpl->SetMenuShowTimings(fadein, fadeout, discovery, discovery_fadein, discovery_fadeout);
}

Here is the call graph for this function:

void unity::panel::Controller::SetOpacity ( float  opacity)

Definition at line 312 of file PanelController.cpp.

Here is the call graph for this function:

Definition at line 317 of file PanelController.cpp.

Here is the call graph for this function:


Member Data Documentation

Definition at line 58 of file PanelController.h.


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