Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
DialogDefinition::Item Struct Reference

#include <ShuttleGui.h>

Collaboration diagram for DialogDefinition::Item:
[legend]

Public Member Functions

 Item ()=default
 
template<typename Factory >
Item && Validator (const Factory &f) &&
 
template<typename V , typename... Args>
Item && Validator (Args &&... args) &&
 
Item && ToolTip (const TranslatableString &tip) &&
 
Item && Name (const TranslatableString &name) &&
 
Item && NameSuffix (const TranslatableString &suffix) &&
 
Item && Style (long style) &&
 
Item && Focus (bool focused=true) &&
 
Item && Disable (bool disabled=true) &&
 
template<typename Tag , typename Argument , typename Handler >
auto ConnectRoot (wxEventTypeTag< Tag > eventType, void(Handler::*func)(Argument &)) &&-> std::enable_if_t< std::is_base_of_v< Argument, Tag >, Item && >
 
Item && MinSize () &&
 
Item && MinSize (wxSize sz) &&
 
Item && Position (int flags) &&
 
Item && Size (wxSize size) &&
 

Public Attributes

std::function< void(wxWindow *) > mValidatorSetter
 
TranslatableString mToolTip
 
TranslatableString mName
 
TranslatableString mNameSuffix
 
std::vector< std::pair< wxEventType, wxObjectEventFunction > > mRootConnections
 
long miStyle {}
 
int mWindowPositionFlags { 0 }
 
wxSize mWindowSize {}
 
wxSize mMinSize { -1, -1 }
 
bool mHasMinSize { false }
 
bool mUseBestSize { false }
 
bool mFocused { false }
 
bool mDisabled { false }
 

Detailed Description

Definition at line 110 of file ShuttleGui.h.

Constructor & Destructor Documentation

◆ Item()

DialogDefinition::Item::Item ( )
default

Member Function Documentation

◆ ConnectRoot()

template<typename Tag , typename Argument , typename Handler >
auto DialogDefinition::Item::ConnectRoot ( wxEventTypeTag< Tag >  eventType,
void(Handler::*)(Argument &)  func 
) && -> std::enable_if_t< std::is_base_of_v<Argument, Tag>, Item&& >
inline

Definition at line 174 of file ShuttleGui.h.

181 {
182 mRootConnections.push_back({
183 eventType,
184 (void(wxEvtHandler::*)(wxEvent&)) (
185 static_cast<void(wxEvtHandler::*)(Argument&)>( func )
186 )
187 });
188 return std::move( *this );
189 }
std::vector< std::pair< wxEventType, wxObjectEventFunction > > mRootConnections
Definition: ShuttleGui.h:220

References mRootConnections.

◆ Disable()

Item && DialogDefinition::Item::Disable ( bool  disabled = true) &&
inline

Definition at line 163 of file ShuttleGui.h.

164 {
165 mDisabled = disabled;
166 return std::move( *this );
167 }

References mDisabled.

◆ Focus()

Item && DialogDefinition::Item::Focus ( bool  focused = true) &&
inline

Definition at line 157 of file ShuttleGui.h.

158 {
159 mFocused = focused;
160 return std::move( *this );
161 }

References mFocused.

◆ MinSize() [1/2]

Item && DialogDefinition::Item::MinSize ( ) &&
inline

Definition at line 191 of file ShuttleGui.h.

192 {
193 mUseBestSize = true;
194 return std::move ( *this );
195 }

References mUseBestSize.

◆ MinSize() [2/2]

Item && DialogDefinition::Item::MinSize ( wxSize  sz) &&
inline

Definition at line 197 of file ShuttleGui.h.

198 {
199 mMinSize = sz; mHasMinSize = true;
200 return std::move ( *this );
201 }

References mHasMinSize, and mMinSize.

◆ Name()

Item && DialogDefinition::Item::Name ( const TranslatableString name) &&
inline

Definition at line 136 of file ShuttleGui.h.

137 {
138 mName = name;
139 return std::move( *this );
140 }
wxString name
Definition: TagsEditor.cpp:166
TranslatableString mName
Definition: ShuttleGui.h:217

References mName, and name.

◆ NameSuffix()

Item && DialogDefinition::Item::NameSuffix ( const TranslatableString suffix) &&
inline

Definition at line 144 of file ShuttleGui.h.

145 {
146 mNameSuffix = suffix;
147 return std::move( *this );
148 }
TranslatableString mNameSuffix
Definition: ShuttleGui.h:218

References mNameSuffix.

◆ Position()

Item && DialogDefinition::Item::Position ( int  flags) &&
inline

Definition at line 203 of file ShuttleGui.h.

204 {
205 mWindowPositionFlags = flags;
206 return std::move( *this );
207 }

References mWindowPositionFlags.

◆ Size()

Item && DialogDefinition::Item::Size ( wxSize  size) &&
inline

Definition at line 209 of file ShuttleGui.h.

210 {
212 return std::move( *this );
213 }

References mWindowSize, and size.

◆ Style()

Item && DialogDefinition::Item::Style ( long  style) &&
inline

◆ ToolTip()

Item && DialogDefinition::Item::ToolTip ( const TranslatableString tip) &&
inline

Definition at line 129 of file ShuttleGui.h.

130 {
131 mToolTip = tip;
132 return std::move( *this );
133 }
TranslatableString mToolTip
Definition: ShuttleGui.h:216

References mToolTip.

◆ Validator() [1/2]

template<typename V , typename... Args>
Item && DialogDefinition::Item::Validator ( Args &&...  args) &&
inline

Definition at line 126 of file ShuttleGui.h.

127 { return std::move(*this).Validator( [args...]{ return V( args... ); } ); }

References Validator().

Here is the call graph for this function:

◆ Validator() [2/2]

template<typename Factory >
Item && DialogDefinition::Item::Validator ( const Factory &  f) &&
inline

Definition at line 118 of file ShuttleGui.h.

119 {
120 mValidatorSetter = [f](wxWindow *p){ p->SetValidator(f()); };
121 return std::move(*this);
122 }
std::function< void(wxWindow *) > mValidatorSetter
Definition: ShuttleGui.h:215

References mValidatorSetter.

Referenced by Validator().

Here is the caller graph for this function:

Member Data Documentation

◆ mDisabled

bool DialogDefinition::Item::mDisabled { false }

Definition at line 234 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and Disable().

◆ mFocused

bool DialogDefinition::Item::mFocused { false }

Definition at line 233 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and Focus().

◆ mHasMinSize

bool DialogDefinition::Item::mHasMinSize { false }

Definition at line 230 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and MinSize().

◆ miStyle

long DialogDefinition::Item::miStyle {}

Definition at line 222 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::AddReadOnlyText(), ShuttleGuiBase::GetStyle(), and Style().

◆ mMinSize

wxSize DialogDefinition::Item::mMinSize { -1, -1 }

Definition at line 229 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and MinSize().

◆ mName

TranslatableString DialogDefinition::Item::mName

Definition at line 217 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and Name().

◆ mNameSuffix

TranslatableString DialogDefinition::Item::mNameSuffix

Definition at line 218 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and NameSuffix().

◆ mRootConnections

std::vector<std::pair<wxEventType, wxObjectEventFunction> > DialogDefinition::Item::mRootConnections

Definition at line 220 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and ConnectRoot().

◆ mToolTip

TranslatableString DialogDefinition::Item::mToolTip

Definition at line 216 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and ToolTip().

◆ mUseBestSize

bool DialogDefinition::Item::mUseBestSize { false }

Definition at line 231 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and MinSize().

◆ mValidatorSetter

std::function< void(wxWindow*) > DialogDefinition::Item::mValidatorSetter

Definition at line 215 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::ApplyItem(), and Validator().

◆ mWindowPositionFlags

int DialogDefinition::Item::mWindowPositionFlags { 0 }

Definition at line 225 of file ShuttleGui.h.

Referenced by Position(), and ShuttleGuiBase::UpdateSizersCore().

◆ mWindowSize

wxSize DialogDefinition::Item::mWindowSize {}

Definition at line 227 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::AddSlider(), ShuttleGuiBase::ApplyItem(), and Size().


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