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 111 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 175 of file ShuttleGui.h.

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

References mRootConnections.

◆ Disable()

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

Definition at line 164 of file ShuttleGui.h.

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

References mDisabled.

◆ Focus()

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

Definition at line 158 of file ShuttleGui.h.

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

References mFocused.

◆ MinSize() [1/2]

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

Definition at line 192 of file ShuttleGui.h.

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

References mUseBestSize.

◆ MinSize() [2/2]

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

Definition at line 198 of file ShuttleGui.h.

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

References mHasMinSize, and mMinSize.

◆ Name()

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

Definition at line 137 of file ShuttleGui.h.

138 {
139 mName = name;
140 return std::move( *this );
141 }
const TranslatableString name
Definition: Distortion.cpp:82
TranslatableString mName
Definition: ShuttleGui.h:218

References mName, and name.

◆ NameSuffix()

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

Definition at line 145 of file ShuttleGui.h.

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

References mNameSuffix.

◆ Position()

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

Definition at line 204 of file ShuttleGui.h.

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

References mWindowPositionFlags.

◆ Size()

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

Definition at line 210 of file ShuttleGui.h.

211 {
213 return std::move( *this );
214 }

References mWindowSize, and size.

◆ Style()

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

Definition at line 151 of file ShuttleGui.h.

152 {
153 miStyle = style;
154 return std::move( *this );
155 }

References miStyle.

◆ ToolTip()

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

Definition at line 130 of file ShuttleGui.h.

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

References mToolTip.

◆ Validator() [1/2]

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

Definition at line 127 of file ShuttleGui.h.

128 { 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 119 of file ShuttleGui.h.

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

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 235 of file ShuttleGui.h.

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

◆ mFocused

bool DialogDefinition::Item::mFocused { false }

Definition at line 234 of file ShuttleGui.h.

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

◆ mHasMinSize

bool DialogDefinition::Item::mHasMinSize { false }

Definition at line 231 of file ShuttleGui.h.

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

◆ miStyle

long DialogDefinition::Item::miStyle {}

Definition at line 223 of file ShuttleGui.h.

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

◆ mMinSize

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

Definition at line 230 of file ShuttleGui.h.

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

◆ mName

TranslatableString DialogDefinition::Item::mName

Definition at line 218 of file ShuttleGui.h.

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

◆ mNameSuffix

TranslatableString DialogDefinition::Item::mNameSuffix

Definition at line 219 of file ShuttleGui.h.

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

◆ mRootConnections

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

Definition at line 221 of file ShuttleGui.h.

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

◆ mToolTip

TranslatableString DialogDefinition::Item::mToolTip

Definition at line 217 of file ShuttleGui.h.

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

◆ mUseBestSize

bool DialogDefinition::Item::mUseBestSize { false }

Definition at line 232 of file ShuttleGui.h.

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

◆ mValidatorSetter

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

Definition at line 216 of file ShuttleGui.h.

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

◆ mWindowPositionFlags

int DialogDefinition::Item::mWindowPositionFlags { 0 }

Definition at line 226 of file ShuttleGui.h.

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

◆ mWindowSize

wxSize DialogDefinition::Item::mWindowSize {}

Definition at line 228 of file ShuttleGui.h.

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


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