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

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

References mRootConnections.

◆ Disable()

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

Definition at line 162 of file ShuttleGui.h.

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

References mDisabled.

◆ Focus()

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

Definition at line 156 of file ShuttleGui.h.

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

References mFocused.

◆ MinSize() [1/2]

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

Definition at line 190 of file ShuttleGui.h.

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

References mUseBestSize.

◆ MinSize() [2/2]

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

Definition at line 196 of file ShuttleGui.h.

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

References mHasMinSize, and mMinSize.

◆ Name()

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

Definition at line 135 of file ShuttleGui.h.

136 {
137 mName = name;
138 return std::move( *this );
139 }
const TranslatableString name
Definition: Distortion.cpp:76
TranslatableString mName
Definition: ShuttleGui.h:216

References mName, and name.

◆ NameSuffix()

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

Definition at line 143 of file ShuttleGui.h.

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

References mNameSuffix.

◆ Position()

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

Definition at line 202 of file ShuttleGui.h.

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

References mWindowPositionFlags.

◆ Size()

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

Definition at line 208 of file ShuttleGui.h.

209 {
211 return std::move( *this );
212 }

References mWindowSize, and size.

◆ Style()

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

Definition at line 149 of file ShuttleGui.h.

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

References miStyle.

◆ ToolTip()

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

Definition at line 128 of file ShuttleGui.h.

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

References mToolTip.

◆ Validator() [1/2]

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

Definition at line 125 of file ShuttleGui.h.

126 { 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 117 of file ShuttleGui.h.

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

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

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

◆ mFocused

bool DialogDefinition::Item::mFocused { false }

Definition at line 232 of file ShuttleGui.h.

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

◆ mHasMinSize

bool DialogDefinition::Item::mHasMinSize { false }

Definition at line 229 of file ShuttleGui.h.

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

◆ miStyle

long DialogDefinition::Item::miStyle {}

Definition at line 221 of file ShuttleGui.h.

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

◆ mMinSize

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

Definition at line 228 of file ShuttleGui.h.

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

◆ mName

TranslatableString DialogDefinition::Item::mName

Definition at line 216 of file ShuttleGui.h.

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

◆ mNameSuffix

TranslatableString DialogDefinition::Item::mNameSuffix

Definition at line 217 of file ShuttleGui.h.

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

◆ mRootConnections

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

Definition at line 219 of file ShuttleGui.h.

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

◆ mToolTip

TranslatableString DialogDefinition::Item::mToolTip

Definition at line 215 of file ShuttleGui.h.

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

◆ mUseBestSize

bool DialogDefinition::Item::mUseBestSize { false }

Definition at line 230 of file ShuttleGui.h.

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

◆ mValidatorSetter

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

Definition at line 214 of file ShuttleGui.h.

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

◆ mWindowPositionFlags

int DialogDefinition::Item::mWindowPositionFlags { 0 }

Definition at line 224 of file ShuttleGui.h.

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

◆ mWindowSize

wxSize DialogDefinition::Item::mWindowSize {}

Definition at line 226 of file ShuttleGui.h.

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


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