1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-11-22 18:31:58 +00:00
parent b64bdda679
commit bddd43749f
4 changed files with 26 additions and 1 deletions

View file

@ -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()

View file

@ -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);
}

View file

@ -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;

View file

@ -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.