Heaven v0.1.0-1
C++ global-menu library for Wayland sessions
Loading...
Searching...
No Matches
Static Public Member Functions
HNTopbar Class Reference

Top bar container created by a client. More...

#include "HNTopbar.h"

Inheritance diagram for HNTopbar:
Inheritance graph
[legend]
Collaboration diagram for HNTopbar:
Collaboration graph
[legend]

Static Public Member Functions

static std::shared_ptr< HNTopbarMake () noexcept
 Creates a new topbar.
 

Additional Inherited Members

- Public Types inherited from HNObject
enum  Type {
  Topbar ,
  Menu ,
  Action ,
  Toggle ,
  Divider
}
 Enumeration of the possible object roles. More...
 
- Public Member Functions inherited from HNObject
UInt32 id () const noexcept
 Returns the unique identifier of this object within the client.
 
Type type () const noexcept
 Returns the immutable role/type of this object.
 
std::shared_ptr< HNClientclient () const noexcept
 Returns the client that owns this object.
 
 ~HNObject () noexcept
 Destructor. Notifies the bar that the object was destroyed.
 
- Public Member Functions inherited from HNWithChildren
virtual ~HNWithChildren () noexcept
 Destructor. Detaches every child from this object.
 
const std::list< HNWithParent * > & children () const noexcept
 Returns the ordered list of child objects.
 
- Data Fields inherited from HNObject
CZSignal< HNObject * > onClicked
 Emitted when the bar notifies that this object was clicked.
 
- Protected Member Functions inherited from HNObject
 HNObject (std::shared_ptr< HNClient > client, UInt32 id, Type type) noexcept
 Constructs an object owned by the given client.
 

Detailed Description

Top bar container created by a client.

A topbar hosts menus and represents the menu of a single window. A client may create several topbars (e.g. one per window) and use HNClient::setActiveTopbar() to tell the bar which one should currently be displayed.

Member Function Documentation

◆ Make()

static std::shared_ptr< HNTopbar > Make ( )
staticnoexcept

Creates a new topbar.

Returns
Shared pointer to the new topbar, or nullptr on failure (no client instance or object id limit reached).

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