1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Wav format fix. Minor introjucer clean-ups.

This commit is contained in:
jules 2012-02-04 21:28:24 +00:00
parent f7d3521e06
commit 17e7f22976
6 changed files with 28 additions and 112 deletions

View file

@ -33,10 +33,6 @@ JucerTreeViewBase::JucerTreeViewBase()
setLinesDrawnForSubItems (false);
}
JucerTreeViewBase::~JucerTreeViewBase()
{
}
Font JucerTreeViewBase::getFont() const
{
return Font (getItemHeight() * 0.6f);
@ -113,7 +109,8 @@ Component* JucerTreeViewBase::createItemComponent()
}
//==============================================================================
class RenameTreeItemCallback : public ModalComponentManager::Callback
class RenameTreeItemCallback : public ModalComponentManager::Callback,
public TextEditorListener
{
public:
RenameTreeItemCallback (JucerTreeViewBase& item_, Component& parent, const Rectangle<int>& bounds)
@ -123,7 +120,7 @@ public:
ed.setPopupMenuEnabled (false);
ed.setSelectAllWhenFocused (true);
ed.setFont (item.getFont());
ed.addListener (&item);
ed.addListener (this);
ed.setText (item.getRenamingName());
ed.setBounds (bounds);
@ -137,6 +134,11 @@ public:
item.setName (ed.getText());
}
void textEditorTextChanged (TextEditor&) {}
void textEditorReturnKeyPressed (TextEditor& editor) { editor.exitModalState (1); }
void textEditorEscapeKeyPressed (TextEditor& editor) { editor.exitModalState (0); }
void textEditorFocusLost (TextEditor& editor) { editor.exitModalState (0); }
private:
TextEditor ed;
JucerTreeViewBase& item;