mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Removed the (rather pointless) granularity value from the array objects. Converted a few macros into functions and other misc code clean-ups.
This commit is contained in:
parent
c368805559
commit
97035bb3a1
69 changed files with 218 additions and 369 deletions
|
|
@ -36,10 +36,8 @@ BEGIN_JUCE_NAMESPACE
|
|||
//==============================================================================
|
||||
Button::Button (const String& name)
|
||||
: Component (name),
|
||||
shortcuts (2),
|
||||
keySource (0),
|
||||
text (name),
|
||||
buttonListeners (2),
|
||||
buttonPressTime (0),
|
||||
lastTimeCallbackTime (0),
|
||||
commandManagerToUse (0),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ Label::Label (const String& componentName,
|
|||
text (labelText),
|
||||
font (15.0f),
|
||||
justification (Justification::centredLeft),
|
||||
listeners (2),
|
||||
ownerComponent (0),
|
||||
horizontalBorderSize (3),
|
||||
verticalBorderSize (1),
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ private:
|
|||
//==============================================================================
|
||||
Slider::Slider (const String& name)
|
||||
: Component (name),
|
||||
listeners (2),
|
||||
lastCurrentValue (0),
|
||||
lastValueMin (0),
|
||||
lastValueMax (0),
|
||||
|
|
|
|||
|
|
@ -64,8 +64,7 @@ private:
|
|||
|
||||
//==============================================================================
|
||||
TableHeaderComponent::TableHeaderComponent()
|
||||
: listeners (2),
|
||||
columnsChanged (false),
|
||||
: columnsChanged (false),
|
||||
columnsResized (false),
|
||||
sortChanged (false),
|
||||
menuActive (true),
|
||||
|
|
|
|||
|
|
@ -79,17 +79,17 @@ public:
|
|||
const Colour& colour_,
|
||||
const tchar passwordCharacter)
|
||||
: font (font_),
|
||||
colour (colour_),
|
||||
atoms (64)
|
||||
colour (colour_)
|
||||
{
|
||||
initialiseAtoms (text, passwordCharacter);
|
||||
}
|
||||
|
||||
UniformTextSection (const UniformTextSection& other)
|
||||
: font (other.font),
|
||||
colour (other.colour),
|
||||
atoms (64)
|
||||
colour (other.colour)
|
||||
{
|
||||
atoms.ensureStorageAllocated (other.atoms.size());
|
||||
|
||||
for (int i = 0; i < other.atoms.size(); ++i)
|
||||
atoms.add (new TextAtom (*(const TextAtom*) other.atoms.getUnchecked(i)));
|
||||
}
|
||||
|
|
@ -141,6 +141,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
atoms.ensureStorageAllocated (atoms.size() + other.atoms.size() - i);
|
||||
|
||||
while (i < other.atoms.size())
|
||||
{
|
||||
atoms.add (other.getAtom(i));
|
||||
|
|
@ -990,10 +992,8 @@ TextEditor::TextEditor (const String& name,
|
|||
currentFont (14.0f),
|
||||
totalNumChars (0),
|
||||
caretPosition (0),
|
||||
sections (8),
|
||||
passwordCharacter (passwordCharacter_),
|
||||
dragType (notDragging),
|
||||
listeners (2)
|
||||
dragType (notDragging)
|
||||
{
|
||||
setOpaque (true);
|
||||
|
||||
|
|
|
|||
|
|
@ -1086,7 +1086,6 @@ enum TreeViewOpenness
|
|||
TreeViewItem::TreeViewItem()
|
||||
: ownerView (0),
|
||||
parentItem (0),
|
||||
subItems (8),
|
||||
y (0),
|
||||
itemHeight (0),
|
||||
totalHeight (0),
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ BEGIN_JUCE_NAMESPACE
|
|||
|
||||
//==============================================================================
|
||||
DirectoryContentsDisplayComponent::DirectoryContentsDisplayComponent (DirectoryContentsList& listToShow)
|
||||
: fileList (listToShow),
|
||||
listeners (2)
|
||||
: fileList (listToShow)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
|
|||
: FileFilter (String::empty),
|
||||
fileFilter (fileFilter_),
|
||||
flags (flags_),
|
||||
listeners (2),
|
||||
previewComp (previewComp_),
|
||||
thread ("Juce FileBrowser")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ BEGIN_JUCE_NAMESPACE
|
|||
Component* Component::componentUnderMouse = 0;
|
||||
Component* Component::currentlyFocusedComponent = 0;
|
||||
|
||||
static Array <Component*> modalComponentStack (4), modalComponentReturnValueKeys (4);
|
||||
static Array <int> modalReturnValues (4);
|
||||
static Array <Component*> modalComponentStack, modalComponentReturnValueKeys;
|
||||
static Array <int> modalReturnValues;
|
||||
|
||||
static const int customCommandMessage = 0x7fff0001;
|
||||
static const int exitModalStateMessage = 0x7fff0002;
|
||||
|
|
@ -108,7 +108,6 @@ Component::Component() throw()
|
|||
: parentComponent_ (0),
|
||||
componentUID (++nextComponentUID),
|
||||
numDeepMouseListeners (0),
|
||||
childComponentList_ (16),
|
||||
lookAndFeel_ (0),
|
||||
effect_ (0),
|
||||
bufferedImage_ (0),
|
||||
|
|
@ -125,7 +124,6 @@ Component::Component (const String& name) throw()
|
|||
parentComponent_ (0),
|
||||
componentUID (++nextComponentUID),
|
||||
numDeepMouseListeners (0),
|
||||
childComponentList_ (16),
|
||||
lookAndFeel_ (0),
|
||||
effect_ (0),
|
||||
bufferedImage_ (0),
|
||||
|
|
@ -2163,7 +2161,7 @@ void Component::parentSizeChanged()
|
|||
void Component::addComponentListener (ComponentListener* const newListener) throw()
|
||||
{
|
||||
if (componentListeners_ == 0)
|
||||
componentListeners_ = new VoidArray (4);
|
||||
componentListeners_ = new VoidArray();
|
||||
|
||||
componentListeners_->addIfNotAlreadyThere (newListener);
|
||||
}
|
||||
|
|
@ -2243,7 +2241,7 @@ void Component::addMouseListener (MouseListener* const newListener,
|
|||
checkMessageManagerIsLocked
|
||||
|
||||
if (mouseListeners_ == 0)
|
||||
mouseListeners_ = new VoidArray (4);
|
||||
mouseListeners_ = new VoidArray();
|
||||
|
||||
if (! mouseListeners_->contains (newListener))
|
||||
{
|
||||
|
|
@ -3509,7 +3507,7 @@ const Rectangle Component::getParentMonitorArea() const throw()
|
|||
void Component::addKeyListener (KeyListener* const newListener) throw()
|
||||
{
|
||||
if (keyListeners_ == 0)
|
||||
keyListeners_ = new VoidArray (4);
|
||||
keyListeners_ = new VoidArray();
|
||||
|
||||
keyListeners_->addIfNotAlreadyThere (newListener);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,11 +40,7 @@ extern void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords,
|
|||
static Desktop* juce_desktopInstance = 0;
|
||||
|
||||
Desktop::Desktop() throw()
|
||||
: mouseListeners (2),
|
||||
desktopComponents (4),
|
||||
monitorCoordsClipped (2),
|
||||
monitorCoordsUnclipped (2),
|
||||
lastMouseX (0),
|
||||
: lastMouseX (0),
|
||||
lastMouseY (0),
|
||||
kioskModeComponent (0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ BEGIN_JUCE_NAMESPACE
|
|||
ComponentMovementWatcher::ComponentMovementWatcher (Component* const component_)
|
||||
: component (component_),
|
||||
lastPeer (0),
|
||||
registeredParentComps (4),
|
||||
reentrant (false)
|
||||
{
|
||||
jassert (component != 0); // can't use this with a null pointer..
|
||||
|
|
|
|||
|
|
@ -98,8 +98,7 @@ ScrollBar::ScrollBar (const bool vertical_,
|
|||
isDraggingThumb (false),
|
||||
alwaysVisible (false),
|
||||
upButton (0),
|
||||
downButton (0),
|
||||
listeners (2)
|
||||
downButton (0)
|
||||
{
|
||||
setButtonVisibility (buttonsAreVisible);
|
||||
|
||||
|
|
|
|||
|
|
@ -1281,15 +1281,13 @@ private:
|
|||
|
||||
//==============================================================================
|
||||
PopupMenu::PopupMenu()
|
||||
: items (8),
|
||||
lookAndFeel (0),
|
||||
: lookAndFeel (0),
|
||||
separatorPending (false)
|
||||
{
|
||||
}
|
||||
|
||||
PopupMenu::PopupMenu (const PopupMenu& other)
|
||||
: items (8),
|
||||
lookAndFeel (other.lookAndFeel),
|
||||
: lookAndFeel (other.lookAndFeel),
|
||||
separatorPending (false)
|
||||
{
|
||||
items.ensureStorageAllocated (other.items.size());
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void juce_deleteMouseCursor (void* const cursorHandle, const bool isStandard) th
|
|||
|
||||
//==============================================================================
|
||||
static CriticalSection activeCursorListLock;
|
||||
static VoidArray activeCursors (2);
|
||||
static VoidArray activeCursors;
|
||||
|
||||
//==============================================================================
|
||||
class SharedMouseCursorInternal : public ReferenceCountedObject
|
||||
|
|
|
|||
|
|
@ -674,6 +674,7 @@ private:
|
|||
return y;
|
||||
}
|
||||
|
||||
public:
|
||||
//==============================================================================
|
||||
class ChannelSelectorListBox : public ListBox,
|
||||
public ListBoxModel
|
||||
|
|
@ -930,6 +931,7 @@ private:
|
|||
const ChannelSelectorListBox& operator= (const ChannelSelectorListBox&);
|
||||
};
|
||||
|
||||
private:
|
||||
ChannelSelectorListBox* inputChanList;
|
||||
ChannelSelectorListBox* outputChanList;
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@ MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& state_,
|
|||
canScroll (true),
|
||||
mouseDragging (false),
|
||||
useMousePositionForVelocity (true),
|
||||
keyPresses (4),
|
||||
keyPressNotes (16),
|
||||
keyMappingOctave (6),
|
||||
octaveNumForMiddleC (3)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ extern bool juce_MouseHasMovedSignificantlySincePressed;
|
|||
|
||||
static const int fakeMouseMoveMessage = 0x7fff00ff;
|
||||
|
||||
static VoidArray heavyweightPeers (4);
|
||||
static VoidArray heavyweightPeers;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ class TopLevelWindowManager : public Timer,
|
|||
public:
|
||||
//==============================================================================
|
||||
TopLevelWindowManager()
|
||||
: windows (8),
|
||||
currentActive (0)
|
||||
: currentActive (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue