mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
b64bdda679
commit
bddd43749f
4 changed files with 26 additions and 1 deletions
|
|
@ -443,6 +443,9 @@ static void updateKeyModifiers() throw()
|
|||
|
||||
if ((GetKeyState (VK_MENU) & 0x8000) != 0)
|
||||
currentModifiers |= ModifierKeys::altModifier;
|
||||
|
||||
if ((GetKeyState (VK_RMENU) & 0x8000) != 0)
|
||||
currentModifiers &= ~(ModifierKeys::ctrlModifier | ModifierKeys::altModifier);
|
||||
}
|
||||
|
||||
void ModifierKeys::updateCurrentModifiers() throw()
|
||||
|
|
|
|||
|
|
@ -1121,7 +1121,7 @@ const Font LookAndFeel::getComboBoxFont (ComboBox& box)
|
|||
return f;
|
||||
}
|
||||
|
||||
Label* LookAndFeel::createComboBoxTextBox (ComboBox& box)
|
||||
Label* LookAndFeel::createComboBoxTextBox (ComboBox&)
|
||||
{
|
||||
return new Label (String::empty, String::empty);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1761,6 +1761,26 @@ bool PopupMenu::containsCommandItem (const int commandID) const throw()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool PopupMenu::containsAnyActiveItems() const throw()
|
||||
{
|
||||
for (int i = items.size(); --i >= 0;)
|
||||
{
|
||||
const MenuItemInfo* const mi = (const MenuItemInfo*) items.getUnchecked (i);
|
||||
|
||||
if (mi->subMenu != 0)
|
||||
{
|
||||
if (mi->subMenu->containsAnyActiveItems())
|
||||
return true;
|
||||
}
|
||||
else if (mi->active)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void PopupMenu::setLookAndFeel (LookAndFeel* const newLookAndFeel) throw()
|
||||
{
|
||||
lookAndFeel = newLookAndFeel;
|
||||
|
|
|
|||
|
|
@ -217,6 +217,8 @@ public:
|
|||
/** Returns true if the menu contains a command item that triggers the given command. */
|
||||
bool containsCommandItem (const int commandID) const throw();
|
||||
|
||||
/** Returns true if the menu contains any items that can be used. */
|
||||
bool containsAnyActiveItems() const throw();
|
||||
|
||||
//==============================================================================
|
||||
/** Displays the menu and waits for the user to pick something.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue