KiCad PCB EDA Suite
EDA_INFOBAR_PANEL Class Reference

A wxPanel derived class that hold an infobar and another control. More...

#include <infobar.h>

Inheritance diagram for EDA_INFOBAR_PANEL:

Public Member Functions

 EDA_INFOBAR_PANEL (wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
 
void AddInfoBar (WX_INFOBAR *aInfoBar)
 Add the given infobar object to the panel. More...
 
void AddOtherItem (wxWindow *aOtherItem)
 Add the other item to the panel. More...
 

Protected Attributes

wxFlexGridSizer * m_mainSizer
 

Detailed Description

A wxPanel derived class that hold an infobar and another control.

The infobar is located at the top of the panel, and the other control is located below it.

This allows the infobar to be controlled nicely by an AUI manager, since adding the infobar on its own to the AUI manager produces artifacts when showing/hiding it due to the AUI pane layout.

Note that this implementation currently has issues on Windows with event processing inside the GAL canvas, see: https://gitlab.com/kicad/code/kicad/-/issues/4501

Definition at line 276 of file infobar.h.

Constructor & Destructor Documentation

◆ EDA_INFOBAR_PANEL()

EDA_INFOBAR_PANEL::EDA_INFOBAR_PANEL ( wxWindow *  aParent,
wxWindowID  aId = wxID_ANY,
const wxPoint &  aPos = wxDefaultPosition,
const wxSize &  aSize = wxSize( -1,-1 ),
long  aStyle = wxTAB_TRAVERSAL,
const wxString &  aName = wxEmptyString 
)

Definition at line 352 of file infobar.cpp.

354  : wxPanel( aParent, aId, aPos, aSize, aStyle, aName )
355 {
356  m_mainSizer = new wxFlexGridSizer( 1, 0, 0 );
357 
358  m_mainSizer->SetFlexibleDirection( wxBOTH );
359  m_mainSizer->AddGrowableCol( 0, 1 );
360 
361  SetSizer( m_mainSizer );
362 }
wxFlexGridSizer * m_mainSizer
Definition: infobar.h:302

References m_mainSizer.

Member Function Documentation

◆ AddInfoBar()

void EDA_INFOBAR_PANEL::AddInfoBar ( WX_INFOBAR aInfoBar)

Add the given infobar object to the panel.

Parameters
aInfoBaris the infobar to add

Definition at line 365 of file infobar.cpp.

366 {
367  wxASSERT( aInfoBar );
368 
369  aInfoBar->Reparent( this );
370  m_mainSizer->Add( aInfoBar, 1, wxEXPAND, 0 );
371  m_mainSizer->Layout();
372 }
wxFlexGridSizer * m_mainSizer
Definition: infobar.h:302

References m_mainSizer.

◆ AddOtherItem()

void EDA_INFOBAR_PANEL::AddOtherItem ( wxWindow *  aOtherItem)

Add the other item to the panel.

This item will expand to fill up the vertical space left.

Parameters
aOtherItemis the item to add

Definition at line 375 of file infobar.cpp.

376 {
377  wxASSERT( aOtherItem );
378 
379  aOtherItem->Reparent( this );
380  m_mainSizer->Add( aOtherItem, 1, wxEXPAND, 0 );
381 
382  m_mainSizer->AddGrowableRow( 1, 1 );
383  m_mainSizer->Layout();
384 }
wxFlexGridSizer * m_mainSizer
Definition: infobar.h:302

References m_mainSizer.

Member Data Documentation

◆ m_mainSizer

wxFlexGridSizer* EDA_INFOBAR_PANEL::m_mainSizer
protected

Definition at line 302 of file infobar.h.

Referenced by AddInfoBar(), AddOtherItem(), and EDA_INFOBAR_PANEL().


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