Back to index

unity  6.0.0
Public Types | Public Member Functions | Public Attributes | Private Attributes
unity::indicator::Entry Class Reference

#include <IndicatorEntry.h>

Collaboration diagram for unity::indicator::Entry:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::shared_ptr< EntryPtr

Public Member Functions

 Entry (std::string const &id, std::string const &name_hint, std::string const &label, bool label_sensitive, bool label_visible, int image_type, std::string const &image_data, bool image_sensitive, bool image_visible, int priority)
Entryoperator= (Entry const &rhs)
std::string const & id () const
std::string const & name_hint () const
std::string const & label () const
int image_type () const
std::string const & image_data () const
bool image_visible () const
bool image_sensitive () const
bool label_visible () const
bool label_sensitive () const
void set_active (bool active)
bool active () const
void set_geometry (nux::Rect const &geometry)
nux::Rect const & geometry () const
int priority () const
bool visible () const
bool show_now () const
 Whether this entry should be shown to the user.
void set_show_now (bool show_now)
void ShowMenu (int x, int y, unsigned int button, unsigned int timestamp)
void ShowMenu (unsigned int xid, int x, int y, unsigned int button, unsigned int timestamp)
void SecondaryActivate (unsigned int timestamp)
void Scroll (int delta)
void setLabel (std::string const &label, bool sensitive, bool visible)
void setImage (int type, std::string const &data, bool sensitive, bool visible)
void setPriority (int priority)

Public Attributes

sigc::signal< void > updated
sigc::signal< void, bool > active_changed
sigc::signal< void, nux::Rect
const & > 
geometry_changed
sigc::signal< void, bool > show_now_changed
sigc::signal< void,
std::string const &, unsigned
int, int, int, unsigned int,
unsigned int > 
on_show_menu
sigc::signal< void,
std::string const &, unsigned
int > 
on_secondary_activate
sigc::signal< void,
std::string const &, int > 
on_scroll

Private Attributes

std::string id_
std::string name_hint_
std::string label_
bool label_visible_
bool label_sensitive_
int image_type_
std::string image_data_
bool image_visible_
bool image_sensitive_
int priority_
bool show_now_
bool active_
nux::Rect geometry_

Detailed Description

Definition at line 41 of file IndicatorEntry.h.


Member Typedef Documentation

typedef std::shared_ptr<Entry> unity::indicator::Entry::Ptr

Definition at line 44 of file IndicatorEntry.h.


Constructor & Destructor Documentation

unity::indicator::Entry::Entry ( std::string const &  id,
std::string const &  name_hint,
std::string const &  label,
bool  label_sensitive,
bool  label_visible,
int  image_type,
std::string const &  image_data,
bool  image_sensitive,
bool  image_visible,
int  priority 
)

Member Function Documentation

Definition at line 166 of file IndicatorEntry.cpp.

{
  return active_;
}

Here is the caller graph for this function:

nux::Rect const & unity::indicator::Entry::geometry ( ) const

Definition at line 171 of file IndicatorEntry.cpp.

{
  return geometry_;
}

Here is the caller graph for this function:

std::string const & unity::indicator::Entry::id ( ) const

Definition at line 60 of file IndicatorEntry.cpp.

{
  return id_;
}

Here is the caller graph for this function:

std::string const & unity::indicator::Entry::image_data ( ) const

Definition at line 95 of file IndicatorEntry.cpp.

{
  return image_data_;
}

Definition at line 75 of file IndicatorEntry.cpp.

{
  return image_sensitive_;
}

Here is the caller graph for this function:

Definition at line 90 of file IndicatorEntry.cpp.

{
  return image_type_;
}

Definition at line 70 of file IndicatorEntry.cpp.

{
  return image_visible_;
}

Here is the caller graph for this function:

std::string const & unity::indicator::Entry::label ( ) const

Definition at line 65 of file IndicatorEntry.cpp.

{
  return label_;
}

Here is the caller graph for this function:

Definition at line 85 of file IndicatorEntry.cpp.

{
  return label_sensitive_;
}

Here is the caller graph for this function:

Definition at line 80 of file IndicatorEntry.cpp.

{
  return label_visible_;
}

Here is the caller graph for this function:

std::string const & unity::indicator::Entry::name_hint ( ) const

Definition at line 55 of file IndicatorEntry.cpp.

{
  return name_hint_;
}

Here is the caller graph for this function:

Entry & unity::indicator::Entry::operator= ( Entry const &  rhs)

Definition at line 176 of file IndicatorEntry.cpp.

{
  id_ = rhs.id_;
  name_hint_ = rhs.name_hint_;
  label_ = rhs.label_;
  label_sensitive_ = rhs.label_sensitive_;
  label_visible_ = rhs.label_visible_;
  image_type_ = rhs.image_type_;
  image_data_ = rhs.image_data_;
  image_sensitive_ = rhs.image_sensitive_;
  image_visible_ = rhs.image_visible_;
  priority_ = rhs.priority_;

  updated.emit();
  return *this;
}

Definition at line 100 of file IndicatorEntry.cpp.

{
  return priority_;
}

Here is the caller graph for this function:

void unity::indicator::Entry::Scroll ( int  delta)

Definition at line 223 of file IndicatorEntry.cpp.

{
  on_scroll.emit(id_, delta);
}
void unity::indicator::Entry::SecondaryActivate ( unsigned int  timestamp)

Definition at line 218 of file IndicatorEntry.cpp.

{
  on_secondary_activate.emit(id_, timestamp);
}
void unity::indicator::Entry::set_active ( bool  active)

Definition at line 111 of file IndicatorEntry.cpp.

{
  if (active_ == active)
    return;

  active_ = active;
  active_changed.emit(active);
  updated.emit();
}

Here is the call graph for this function:

void unity::indicator::Entry::set_geometry ( nux::Rect const &  geometry)

Definition at line 121 of file IndicatorEntry.cpp.

{
  if (geometry_ == geometry)
    return;

  geometry_ = geometry;
  geometry_changed.emit(geometry);
  updated.emit();
}

Here is the call graph for this function:

void unity::indicator::Entry::set_show_now ( bool  show_now)

Definition at line 198 of file IndicatorEntry.cpp.

{
  if (show_now_ == show_now)
    return;

  show_now_ = show_now;
  show_now_changed.emit(show_now);
  updated.emit();
}

Here is the call graph for this function:

void unity::indicator::Entry::setImage ( int  type,
std::string const &  data,
bool  sensitive,
bool  visible 
)

Definition at line 142 of file IndicatorEntry.cpp.

{
  if (image_type_ == type && image_data_ == data &&
      image_sensitive_ == sensitive && image_visible_ == visible)
  {
    return;
  }

  image_type_ = type;
  image_data_ = data;
  image_sensitive_ = sensitive;
  image_visible_ = visible;
  updated.emit();
}

Here is the call graph for this function:

void unity::indicator::Entry::setLabel ( std::string const &  label,
bool  sensitive,
bool  visible 
)

Definition at line 131 of file IndicatorEntry.cpp.

{
  if (label_ == label && sensitive == label_sensitive_ && visible == label_visible_)
    return;

  label_ = label;
  label_sensitive_ = sensitive;
  label_visible_ = visible;
  updated.emit();
}

Here is the call graph for this function:

void unity::indicator::Entry::setPriority ( int  priority)

Definition at line 157 of file IndicatorEntry.cpp.

{
  if (priority_ == priority)
    return;

  priority_ = priority;
  updated.emit();
}

Here is the call graph for this function:

Whether this entry should be shown to the user.

Example uses: Application menubar items are only shown when the user movoes its mouse over the panel or holds down the Alt key.

Definition at line 193 of file IndicatorEntry.cpp.

{
  return show_now_;
}

Here is the caller graph for this function:

void unity::indicator::Entry::ShowMenu ( int  x,
int  y,
unsigned int  button,
unsigned int  timestamp 
)

Definition at line 208 of file IndicatorEntry.cpp.

{
  ShowMenu(0, x, y, button, timestamp);
}
void unity::indicator::Entry::ShowMenu ( unsigned int  xid,
int  x,
int  y,
unsigned int  button,
unsigned int  timestamp 
)

Definition at line 213 of file IndicatorEntry.cpp.

{
  on_show_menu.emit(id_, xid, x, y, button, timestamp);
}

Definition at line 105 of file IndicatorEntry.cpp.

{
  return ((label_visible_ && !label_.empty()) ||
          (image_type_ != 0 && image_visible_ && !image_data_.empty()));
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 122 of file IndicatorEntry.h.

sigc::signal<void, bool> unity::indicator::Entry::active_changed

Definition at line 99 of file IndicatorEntry.h.

Definition at line 124 of file IndicatorEntry.h.

sigc::signal<void, nux::Rect const&> unity::indicator::Entry::geometry_changed

Definition at line 100 of file IndicatorEntry.h.

std::string unity::indicator::Entry::id_ [private]

Definition at line 108 of file IndicatorEntry.h.

std::string unity::indicator::Entry::image_data_ [private]

Definition at line 116 of file IndicatorEntry.h.

Definition at line 118 of file IndicatorEntry.h.

Definition at line 115 of file IndicatorEntry.h.

Definition at line 117 of file IndicatorEntry.h.

std::string unity::indicator::Entry::label_ [private]

Definition at line 111 of file IndicatorEntry.h.

Definition at line 113 of file IndicatorEntry.h.

Definition at line 112 of file IndicatorEntry.h.

std::string unity::indicator::Entry::name_hint_ [private]

Definition at line 109 of file IndicatorEntry.h.

sigc::signal<void, std::string const&, int> unity::indicator::Entry::on_scroll

Definition at line 105 of file IndicatorEntry.h.

sigc::signal<void, std::string const&, unsigned int> unity::indicator::Entry::on_secondary_activate

Definition at line 104 of file IndicatorEntry.h.

sigc::signal<void, std::string const&, unsigned int, int, int, unsigned int, unsigned int> unity::indicator::Entry::on_show_menu

Definition at line 103 of file IndicatorEntry.h.

Definition at line 119 of file IndicatorEntry.h.

Definition at line 121 of file IndicatorEntry.h.

Definition at line 101 of file IndicatorEntry.h.

Definition at line 98 of file IndicatorEntry.h.


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