Audacity  3.0.3
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 &)) &&-> typename std::enable_if< std::is_base_of< Argument, Tag >::value, Item && >::type
 
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 
) && -> typename std::enable_if< std::is_base_of<Argument, Tag>::value, Item&& >::type
inline

Definition at line 174 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  }

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

137  {
138  mName = name;
139  return std::move( *this );
140  }

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  }

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  {
212  mWindowSize = size;
213  return std::move( *this );
214  }

References mWindowSize.

◆ Style()

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

Definition at line 150 of file ShuttleGui.h.

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

References miStyle.

◆ 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  }

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  }

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:
DialogDefinition::Item::mDisabled
bool mDisabled
Definition: ShuttleGui.h:235
DialogDefinition::Item::mToolTip
TranslatableString mToolTip
Definition: ShuttleGui.h:217
DialogDefinition::Item::mWindowPositionFlags
int mWindowPositionFlags
Definition: ShuttleGui.h:226
DialogDefinition::Item::mName
TranslatableString mName
Definition: ShuttleGui.h:218
DialogDefinition::Item::miStyle
long miStyle
Definition: ShuttleGui.h:223
name
const TranslatableString name
Definition: Distortion.cpp:98
DialogDefinition::Item::mNameSuffix
TranslatableString mNameSuffix
Definition: ShuttleGui.h:219
DialogDefinition::Item::mUseBestSize
bool mUseBestSize
Definition: ShuttleGui.h:232
DialogDefinition::Item::mHasMinSize
bool mHasMinSize
Definition: ShuttleGui.h:231
DialogDefinition::Item::mRootConnections
std::vector< std::pair< wxEventType, wxObjectEventFunction > > mRootConnections
Definition: ShuttleGui.h:221
DialogDefinition::Item::mFocused
bool mFocused
Definition: ShuttleGui.h:234
DialogDefinition::Item::mMinSize
wxSize mMinSize
Definition: ShuttleGui.h:230
DialogDefinition::Item::mWindowSize
wxSize mWindowSize
Definition: ShuttleGui.h:228
DialogDefinition::Item::mValidatorSetter
std::function< void(wxWindow *) > mValidatorSetter
Definition: ShuttleGui.h:216