mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Avoided some pedantic GCC warnings.
This commit is contained in:
parent
664a585d19
commit
12a8dd3092
65 changed files with 595 additions and 614 deletions
|
|
@ -34,22 +34,22 @@ public:
|
|||
defaultWidth_, defaultHeight_)
|
||||
{}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
Button* const b = dynamic_cast <Button*> (component);
|
||||
|
||||
properties.add (new ButtonTextProperty (b, document));
|
||||
props.add (new ButtonTextProperty (b, document));
|
||||
|
||||
properties.add (new ButtonCallbackProperty (b, document));
|
||||
props.add (new ButtonCallbackProperty (b, document));
|
||||
|
||||
properties.add (new ButtonRadioGroupProperty (b, document));
|
||||
props.add (new ButtonRadioGroupProperty (b, document));
|
||||
|
||||
properties.add (new ButtonConnectedEdgeProperty ("connected left", Button::ConnectedOnLeft, b, document));
|
||||
properties.add (new ButtonConnectedEdgeProperty ("connected right", Button::ConnectedOnRight, b, document));
|
||||
properties.add (new ButtonConnectedEdgeProperty ("connected top", Button::ConnectedOnTop, b, document));
|
||||
properties.add (new ButtonConnectedEdgeProperty ("connected bottom", Button::ConnectedOnBottom, b, document));
|
||||
props.add (new ButtonConnectedEdgeProperty ("connected left", Button::ConnectedOnLeft, b, document));
|
||||
props.add (new ButtonConnectedEdgeProperty ("connected right", Button::ConnectedOnRight, b, document));
|
||||
props.add (new ButtonConnectedEdgeProperty ("connected top", Button::ConnectedOnTop, b, document));
|
||||
props.add (new ButtonConnectedEdgeProperty ("connected bottom", Button::ConnectedOnBottom, b, document));
|
||||
}
|
||||
|
||||
XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout)
|
||||
|
|
@ -187,8 +187,8 @@ private:
|
|||
class ButtonTextChangeAction : public ComponentUndoableAction <Button>
|
||||
{
|
||||
public:
|
||||
ButtonTextChangeAction (Button* const comp, ComponentLayout& layout, const String& newName_)
|
||||
: ComponentUndoableAction <Button> (comp, layout),
|
||||
ButtonTextChangeAction (Button* const comp, ComponentLayout& l, const String& newName_)
|
||||
: ComponentUndoableAction <Button> (comp, l),
|
||||
newName (newName_)
|
||||
{
|
||||
oldName = comp->getButtonText();
|
||||
|
|
@ -217,8 +217,8 @@ private:
|
|||
class ButtonCallbackProperty : public ComponentBooleanProperty <Button>
|
||||
{
|
||||
public:
|
||||
ButtonCallbackProperty (Button* button, JucerDocument& document)
|
||||
: ComponentBooleanProperty <Button> ("callback", "Generate ButtonListener", "Generate ButtonListener", button, document)
|
||||
ButtonCallbackProperty (Button* b, JucerDocument& doc)
|
||||
: ComponentBooleanProperty <Button> ("callback", "Generate ButtonListener", "Generate ButtonListener", b, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -234,8 +234,8 @@ private:
|
|||
class ButtonCallbackChangeAction : public ComponentUndoableAction <Button>
|
||||
{
|
||||
public:
|
||||
ButtonCallbackChangeAction (Button* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <Button> (comp, layout),
|
||||
ButtonCallbackChangeAction (Button* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <Button> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = needsButtonListener (comp);
|
||||
|
|
@ -284,8 +284,8 @@ private:
|
|||
class ButtonRadioGroupChangeAction : public ComponentUndoableAction <Button>
|
||||
{
|
||||
public:
|
||||
ButtonRadioGroupChangeAction (Button* const comp, ComponentLayout& layout, const int newId_)
|
||||
: ComponentUndoableAction <Button> (comp, layout),
|
||||
ButtonRadioGroupChangeAction (Button* const comp, ComponentLayout& l, const int newId_)
|
||||
: ComponentUndoableAction <Button> (comp, l),
|
||||
newId (newId_)
|
||||
{
|
||||
oldId = comp->getRadioGroupId();
|
||||
|
|
@ -315,8 +315,8 @@ private:
|
|||
{
|
||||
public:
|
||||
ButtonConnectedEdgeProperty (const String& name, const int flag_,
|
||||
Button* button, JucerDocument& document)
|
||||
: ComponentBooleanProperty <Button> (name, "Connected", "Connected", button, document),
|
||||
Button* b, JucerDocument& doc)
|
||||
: ComponentBooleanProperty <Button> (name, "Connected", "Connected", b, doc),
|
||||
flag (flag_)
|
||||
{
|
||||
}
|
||||
|
|
@ -338,8 +338,8 @@ private:
|
|||
class ButtonConnectedChangeAction : public ComponentUndoableAction <Button>
|
||||
{
|
||||
public:
|
||||
ButtonConnectedChangeAction (Button* const comp, ComponentLayout& layout, const int flag_, const bool newState_)
|
||||
: ComponentUndoableAction <Button> (comp, layout),
|
||||
ButtonConnectedChangeAction (Button* const comp, ComponentLayout& l, const int flag_, const bool newState_)
|
||||
: ComponentUndoableAction <Button> (comp, l),
|
||||
flag (flag_),
|
||||
newState (newState_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,18 +71,18 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
ComboBox* const c = dynamic_cast <ComboBox*> (component);
|
||||
jassert (c != nullptr);
|
||||
|
||||
properties.add (new ComboItemsProperty (c, document));
|
||||
properties.add (new ComboEditableProperty (c, document));
|
||||
properties.add (new ComboJustificationProperty (c, document));
|
||||
properties.add (new ComboTextWhenNoneSelectedProperty (c, document));
|
||||
properties.add (new ComboTextWhenNoItemsProperty (c, document));
|
||||
props.add (new ComboItemsProperty (c, document));
|
||||
props.add (new ComboEditableProperty (c, document));
|
||||
props.add (new ComboJustificationProperty (c, document));
|
||||
props.add (new ComboTextWhenNoneSelectedProperty (c, document));
|
||||
props.add (new ComboTextWhenNoItemsProperty (c, document));
|
||||
}
|
||||
|
||||
String getCreationParameters (Component* component)
|
||||
|
|
@ -193,8 +193,8 @@ private:
|
|||
class ComboEditableChangeAction : public ComponentUndoableAction <ComboBox>
|
||||
{
|
||||
public:
|
||||
ComboEditableChangeAction (ComboBox* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, layout),
|
||||
ComboEditableChangeAction (ComboBox* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isTextEditable();
|
||||
|
|
@ -246,8 +246,8 @@ private:
|
|||
class ComboJustifyChangeAction : public ComponentUndoableAction <ComboBox>
|
||||
{
|
||||
public:
|
||||
ComboJustifyChangeAction (ComboBox* const comp, ComponentLayout& layout, Justification newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, layout),
|
||||
ComboJustifyChangeAction (ComboBox* const comp, ComponentLayout& l, Justification newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, l),
|
||||
newState (newState_),
|
||||
oldState (comp->getJustificationType())
|
||||
{
|
||||
|
|
@ -296,8 +296,8 @@ private:
|
|||
class ComboItemsChangeAction : public ComponentUndoableAction <ComboBox>
|
||||
{
|
||||
public:
|
||||
ComboItemsChangeAction (ComboBox* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, layout),
|
||||
ComboItemsChangeAction (ComboBox* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getProperties() ["items"];
|
||||
|
|
@ -348,8 +348,8 @@ private:
|
|||
class ComboNonSelTextChangeAction : public ComponentUndoableAction <ComboBox>
|
||||
{
|
||||
public:
|
||||
ComboNonSelTextChangeAction (ComboBox* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, layout),
|
||||
ComboNonSelTextChangeAction (ComboBox* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getTextWhenNothingSelected();
|
||||
|
|
@ -398,8 +398,8 @@ private:
|
|||
class ComboNoItemTextChangeAction : public ComponentUndoableAction <ComboBox>
|
||||
{
|
||||
public:
|
||||
ComboNoItemTextChangeAction (ComboBox* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, layout),
|
||||
ComboNoItemTextChangeAction (ComboBox* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <ComboBox> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getTextWhenNoChoicesAvailable();
|
||||
|
|
|
|||
|
|
@ -55,11 +55,10 @@ private:
|
|||
class CompNameChangeAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
CompNameChangeAction (Component* const comp, ComponentLayout& layout, const String& newName_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
newName (newName_)
|
||||
CompNameChangeAction (Component* const comp, ComponentLayout& l, const String& nm)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newName (nm), oldName (comp->getName())
|
||||
{
|
||||
oldName = comp->getName();
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
@ -106,11 +105,10 @@ private:
|
|||
class CompMemberNameChangeAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
CompMemberNameChangeAction (Component* const comp, ComponentLayout& layout, const String& newName_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
newName (newName_)
|
||||
CompMemberNameChangeAction (Component* const comp, ComponentLayout& l, const String& nm)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newName (nm), oldName (layout.getComponentMemberVariableName (comp))
|
||||
{
|
||||
oldName = layout.getComponentMemberVariableName (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
@ -156,11 +154,10 @@ private:
|
|||
class CompVirtualClassChangeAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
CompVirtualClassChangeAction (Component* const comp, ComponentLayout& layout, const String& newName_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
newName (newName_)
|
||||
CompVirtualClassChangeAction (Component* const comp, ComponentLayout& l, const String& nm)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newName (nm), oldName (layout.getComponentVirtualClassName (comp))
|
||||
{
|
||||
oldName = layout.getComponentVirtualClassName (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
|
|||
|
|
@ -260,8 +260,8 @@ void ComponentTypeHandler::setComponentPosition (Component* comp,
|
|||
class TooltipProperty : public ComponentTextProperty <Component>
|
||||
{
|
||||
public:
|
||||
TooltipProperty (Component* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <Component> ("tooltip", 1024, false, comp, document)
|
||||
TooltipProperty (Component* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty<Component> ("tooltip", 1024, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -281,8 +281,8 @@ private:
|
|||
class SetTooltipAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
SetTooltipAction (Component* const comp, ComponentLayout& layout, const String& newValue_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
SetTooltipAction (Component* const comp, ComponentLayout& l, const String& newValue_)
|
||||
: ComponentUndoableAction<Component> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (comp);
|
||||
|
|
@ -362,8 +362,8 @@ private:
|
|||
class FocusOrderProperty : public ComponentTextProperty <Component>
|
||||
{
|
||||
public:
|
||||
FocusOrderProperty (Component* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <Component> ("focus order", 8, false, comp, document)
|
||||
FocusOrderProperty (Component* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <Component> ("focus order", 8, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -382,8 +382,8 @@ private:
|
|||
class SetFocusOrderAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
SetFocusOrderAction (Component* const comp, ComponentLayout& layout, const int newOrder_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
SetFocusOrderAction (Component* const comp, ComponentLayout& l, const int newOrder_)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newValue (newOrder_)
|
||||
{
|
||||
oldValue = comp->getExplicitFocusOrder();
|
||||
|
|
@ -412,26 +412,24 @@ private:
|
|||
//==============================================================================
|
||||
void ComponentTypeHandler::getEditableProperties (Component* component,
|
||||
JucerDocument& document,
|
||||
Array <PropertyComponent*>& properties)
|
||||
Array<PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new ComponentMemberNameProperty (component, document));
|
||||
properties.add (new ComponentNameProperty (component, document));
|
||||
properties.add (new ComponentVirtualClassProperty (component, document));
|
||||
props.add (new ComponentMemberNameProperty (component, document));
|
||||
props.add (new ComponentNameProperty (component, document));
|
||||
props.add (new ComponentVirtualClassProperty (component, document));
|
||||
|
||||
properties.add (new ComponentPositionProperty (component, document, "x", ComponentPositionProperty::componentX));
|
||||
properties.add (new ComponentPositionProperty (component, document, "y", ComponentPositionProperty::componentY));
|
||||
properties.add (new ComponentPositionProperty (component, document, "width", ComponentPositionProperty::componentWidth));
|
||||
properties.add (new ComponentPositionProperty (component, document, "height", ComponentPositionProperty::componentHeight));
|
||||
props.add (new ComponentPositionProperty (component, document, "x", ComponentPositionProperty::componentX));
|
||||
props.add (new ComponentPositionProperty (component, document, "y", ComponentPositionProperty::componentY));
|
||||
props.add (new ComponentPositionProperty (component, document, "width", ComponentPositionProperty::componentWidth));
|
||||
props.add (new ComponentPositionProperty (component, document, "height", ComponentPositionProperty::componentHeight));
|
||||
|
||||
if (dynamic_cast <SettableTooltipClient*> (component) != nullptr)
|
||||
properties.add (new TooltipProperty (component, document));
|
||||
props.add (new TooltipProperty (component, document));
|
||||
|
||||
properties.add (new FocusOrderProperty (component, document));
|
||||
props.add (new FocusOrderProperty (component, document));
|
||||
}
|
||||
|
||||
void ComponentTypeHandler::addPropertiesToPropertyPanel (Component* comp,
|
||||
JucerDocument& document,
|
||||
PropertyPanel& panel)
|
||||
void ComponentTypeHandler::addPropertiesToPropertyPanel (Component* comp, JucerDocument& document, PropertyPanel& panel)
|
||||
{
|
||||
Array <PropertyComponent*> props;
|
||||
getEditableProperties (comp, document, props);
|
||||
|
|
@ -455,13 +453,13 @@ void ComponentTypeHandler::registerEditableColour (int colourId,
|
|||
|
||||
void ComponentTypeHandler::addColourProperties (Component* component,
|
||||
JucerDocument& document,
|
||||
Array <PropertyComponent*>& properties)
|
||||
Array<PropertyComponent*>& props)
|
||||
{
|
||||
for (int i = 0; i < colours.size(); ++i)
|
||||
properties.add (new ComponentColourIdProperty (component, document,
|
||||
colours[i]->colourId,
|
||||
colours[i]->colourName,
|
||||
true));
|
||||
props.add (new ComponentColourIdProperty (component, document,
|
||||
colours[i]->colourId,
|
||||
colours[i]->colourName,
|
||||
true));
|
||||
}
|
||||
|
||||
String ComponentTypeHandler::getColourIntialisationCode (Component* component,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
virtual void getEditableProperties (Component* component,
|
||||
JucerDocument& document,
|
||||
Array <PropertyComponent*>& properties);
|
||||
Array<PropertyComponent*>& props);
|
||||
|
||||
virtual void addPropertiesToPropertyPanel (Component* component,
|
||||
JucerDocument& document,
|
||||
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
void addColourProperties (Component* component,
|
||||
JucerDocument& document,
|
||||
Array <PropertyComponent*>& properties);
|
||||
Array<PropertyComponent*>& props);
|
||||
|
||||
String getColourIntialisationCode (Component* component,
|
||||
const String& objectName);
|
||||
|
|
|
|||
|
|
@ -97,12 +97,12 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
properties.add (new GenericCompClassProperty (dynamic_cast <GenericComponent*> (component), document));
|
||||
properties.add (new GenericCompParamsProperty (dynamic_cast <GenericComponent*> (component), document));
|
||||
props.add (new GenericCompClassProperty (dynamic_cast <GenericComponent*> (component), document));
|
||||
props.add (new GenericCompParamsProperty (dynamic_cast <GenericComponent*> (component), document));
|
||||
}
|
||||
|
||||
String getClassName (Component* comp) const
|
||||
|
|
@ -132,8 +132,8 @@ private:
|
|||
class GenericCompClassProperty : public ComponentTextProperty <GenericComponent>
|
||||
{
|
||||
public:
|
||||
GenericCompClassProperty (GenericComponent* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <GenericComponent> ("class", 300, false, comp, document)
|
||||
GenericCompClassProperty (GenericComponent* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <GenericComponent> ("class", 300, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -153,8 +153,8 @@ private:
|
|||
class GenericCompClassChangeAction : public ComponentUndoableAction <GenericComponent>
|
||||
{
|
||||
public:
|
||||
GenericCompClassChangeAction (GenericComponent* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <GenericComponent> (comp, layout),
|
||||
GenericCompClassChangeAction (GenericComponent* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <GenericComponent> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->actualClassName;
|
||||
|
|
@ -183,8 +183,8 @@ private:
|
|||
class GenericCompParamsProperty : public ComponentTextProperty <GenericComponent>
|
||||
{
|
||||
public:
|
||||
GenericCompParamsProperty (GenericComponent* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <GenericComponent> ("constructor params", 1024, true, comp, document)
|
||||
GenericCompParamsProperty (GenericComponent* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <GenericComponent> ("constructor params", 1024, true, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -203,8 +203,8 @@ private:
|
|||
class GenericCompParamsChangeAction : public ComponentUndoableAction <GenericComponent>
|
||||
{
|
||||
public:
|
||||
GenericCompParamsChangeAction (GenericComponent* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <GenericComponent> (comp, layout),
|
||||
GenericCompParamsChangeAction (GenericComponent* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <GenericComponent> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->constructorParams;
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ public:
|
|||
code.constructorCode += s;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
properties.add (new GroupTitleProperty ((GroupComponent*) component, document));
|
||||
properties.add (new GroupJustificationProperty ((GroupComponent*) component, document));
|
||||
props.add (new GroupTitleProperty ((GroupComponent*) component, document));
|
||||
props.add (new GroupJustificationProperty ((GroupComponent*) component, document));
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -131,8 +131,8 @@ private:
|
|||
class GroupTitleChangeAction : public ComponentUndoableAction <GroupComponent>
|
||||
{
|
||||
public:
|
||||
GroupTitleChangeAction (GroupComponent* const comp, ComponentLayout& layout, const String& newName_)
|
||||
: ComponentUndoableAction <GroupComponent> (comp, layout),
|
||||
GroupTitleChangeAction (GroupComponent* const comp, ComponentLayout& l, const String& newName_)
|
||||
: ComponentUndoableAction <GroupComponent> (comp, l),
|
||||
newName (newName_)
|
||||
{
|
||||
oldName = comp->getText();
|
||||
|
|
@ -196,8 +196,8 @@ private:
|
|||
class GroupJustifyChangeAction : public ComponentUndoableAction <GroupComponent>
|
||||
{
|
||||
public:
|
||||
GroupJustifyChangeAction (GroupComponent* const comp, ComponentLayout& layout, Justification newState_)
|
||||
: ComponentUndoableAction <GroupComponent> (comp, layout),
|
||||
GroupJustifyChangeAction (GroupComponent* const comp, ComponentLayout& l, Justification newState_)
|
||||
: ComponentUndoableAction <GroupComponent> (comp, l),
|
||||
newState (newState_),
|
||||
oldState (comp->getTextLabelPosition())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ public:
|
|||
return hb;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
HyperlinkButton* const hb = (HyperlinkButton*) component;
|
||||
ButtonHandler::getEditableProperties (component, document, properties);
|
||||
properties.add (new HyperlinkURLProperty (hb, document));
|
||||
addColourProperties (component, document, properties);
|
||||
ButtonHandler::getEditableProperties (component, document, props);
|
||||
props.add (new HyperlinkURLProperty (hb, document));
|
||||
addColourProperties (component, document, props);
|
||||
}
|
||||
|
||||
XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout)
|
||||
|
|
@ -109,8 +109,8 @@ private:
|
|||
class HyperlinkURLChangeAction : public ComponentUndoableAction <HyperlinkButton>
|
||||
{
|
||||
public:
|
||||
HyperlinkURLChangeAction (HyperlinkButton* const comp, ComponentLayout& layout, const URL& newState_)
|
||||
: ComponentUndoableAction <HyperlinkButton> (comp, layout),
|
||||
HyperlinkURLChangeAction (HyperlinkButton* const comp, ComponentLayout& l, const URL& newState_)
|
||||
: ComponentUndoableAction <HyperlinkButton> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getURL();
|
||||
|
|
|
|||
|
|
@ -43,29 +43,29 @@ public:
|
|||
return new ImageButton ("new button");
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ButtonHandler::getEditableProperties (component, document, properties);
|
||||
ButtonHandler::getEditableProperties (component, document, props);
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
|
||||
ImageButton* const ib = (ImageButton*) component;
|
||||
|
||||
ComponentLayout& layout = *document.getComponentLayout();
|
||||
|
||||
properties.add (new ImageButtonProportionProperty (layout, ib));
|
||||
props.add (new ImageButtonProportionProperty (layout, ib));
|
||||
|
||||
properties.add (new ImageButtonResourceProperty (layout, ib, normalImage, "normal image"));
|
||||
properties.add (new ImageButtonOpacityProperty (layout, ib, "opacity", normalImage));
|
||||
properties.add (new ImageButtonColourProperty (layout, ib, "overlay col.", normalImage));
|
||||
props.add (new ImageButtonResourceProperty (layout, ib, normalImage, "normal image"));
|
||||
props.add (new ImageButtonOpacityProperty (layout, ib, "opacity", normalImage));
|
||||
props.add (new ImageButtonColourProperty (layout, ib, "overlay col.", normalImage));
|
||||
|
||||
properties.add (new ImageButtonResourceProperty (layout, ib, overImage, "over image"));
|
||||
properties.add (new ImageButtonOpacityProperty (layout, ib, "opacity", overImage));
|
||||
properties.add (new ImageButtonColourProperty (layout, ib, "overlay col.", overImage));
|
||||
props.add (new ImageButtonResourceProperty (layout, ib, overImage, "over image"));
|
||||
props.add (new ImageButtonOpacityProperty (layout, ib, "opacity", overImage));
|
||||
props.add (new ImageButtonColourProperty (layout, ib, "overlay col.", overImage));
|
||||
|
||||
properties.add (new ImageButtonResourceProperty (layout, ib, downImage, "down image"));
|
||||
properties.add (new ImageButtonOpacityProperty (layout, ib, "opacity", downImage));
|
||||
properties.add (new ImageButtonColourProperty (layout, ib, "overlay col.", downImage));
|
||||
props.add (new ImageButtonResourceProperty (layout, ib, downImage, "down image"));
|
||||
props.add (new ImageButtonOpacityProperty (layout, ib, "opacity", downImage));
|
||||
props.add (new ImageButtonColourProperty (layout, ib, "overlay col.", downImage));
|
||||
}
|
||||
|
||||
XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout)
|
||||
|
|
|
|||
|
|
@ -87,15 +87,15 @@ public:
|
|||
return jucerCompClassName;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
TestComponent* const tc = dynamic_cast <TestComponent*> (component);
|
||||
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
properties.add (new JucerCompFileProperty (tc, document));
|
||||
properties.add (new ConstructorParamsProperty (tc, document));
|
||||
properties.add (new JucerCompOpenDocProperty (tc));
|
||||
props.add (new JucerCompFileProperty (tc, document));
|
||||
props.add (new ConstructorParamsProperty (tc, document));
|
||||
props.add (new JucerCompOpenDocProperty (tc));
|
||||
}
|
||||
|
||||
String getCreationParameters (Component* component)
|
||||
|
|
@ -117,8 +117,8 @@ public:
|
|||
class JucerCompFileChangeAction : public ComponentUndoableAction <TestComponent>
|
||||
{
|
||||
public:
|
||||
JucerCompFileChangeAction (TestComponent* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <TestComponent> (comp, layout),
|
||||
JucerCompFileChangeAction (TestComponent* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <TestComponent> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getFilename();
|
||||
|
|
@ -222,8 +222,8 @@ private:
|
|||
class ConstructorParamsProperty : public ComponentTextProperty <TestComponent>
|
||||
{
|
||||
public:
|
||||
ConstructorParamsProperty (TestComponent* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <TestComponent> ("constructor params", 512, false, comp, document)
|
||||
ConstructorParamsProperty (TestComponent* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <TestComponent> ("constructor params", 512, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -242,8 +242,8 @@ private:
|
|||
class ConstructorParamChangeAction : public ComponentUndoableAction <TestComponent>
|
||||
{
|
||||
public:
|
||||
ConstructorParamChangeAction (TestComponent* const comp, ComponentLayout& layout, const String& newValue_)
|
||||
: ComponentUndoableAction <TestComponent> (comp, layout),
|
||||
ConstructorParamChangeAction (TestComponent* const comp, ComponentLayout& l, const String& newValue_)
|
||||
: ComponentUndoableAction <TestComponent> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
oldValue = comp->getConstructorParams();
|
||||
|
|
|
|||
|
|
@ -157,24 +157,24 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
Label* const l = dynamic_cast <Label*> (component);
|
||||
properties.add (new LabelTextProperty (l, document));
|
||||
props.add (new LabelTextProperty (l, document));
|
||||
|
||||
properties.add (new LabelJustificationProperty (l, document));
|
||||
properties.add (new FontNameProperty (l, document));
|
||||
properties.add (new FontSizeProperty (l, document));
|
||||
properties.add (new FontStyleProperty (l, document));
|
||||
props.add (new LabelJustificationProperty (l, document));
|
||||
props.add (new FontNameProperty (l, document));
|
||||
props.add (new FontSizeProperty (l, document));
|
||||
props.add (new FontStyleProperty (l, document));
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
|
||||
properties.add (new LabelEditableProperty (l, document));
|
||||
props.add (new LabelEditableProperty (l, document));
|
||||
|
||||
if (l->isEditableOnDoubleClick() || l->isEditableOnSingleClick())
|
||||
properties.add (new LabelLossOfFocusProperty (l, document));
|
||||
props.add (new LabelLossOfFocusProperty (l, document));
|
||||
}
|
||||
|
||||
static bool needsCallback (Component* label)
|
||||
|
|
@ -208,8 +208,8 @@ private:
|
|||
class LabelTextChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
LabelTextChangeAction (Label* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
LabelTextChangeAction (Label* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getText();
|
||||
|
|
@ -264,8 +264,8 @@ private:
|
|||
class LabelEditableChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
LabelEditableChangeAction (Label* const comp, ComponentLayout& layout, const int newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
LabelEditableChangeAction (Label* const comp, ComponentLayout& l, const int newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isEditableOnSingleClick()
|
||||
|
|
@ -321,8 +321,8 @@ private:
|
|||
class LabelFocusLossChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
LabelFocusLossChangeAction (Label* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
LabelFocusLossChangeAction (Label* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->doesLossOfFocusDiscardChanges();
|
||||
|
|
@ -390,8 +390,8 @@ private:
|
|||
class LabelJustifyChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
LabelJustifyChangeAction (Label* const comp, ComponentLayout& layout, Justification newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
LabelJustifyChangeAction (Label* const comp, ComponentLayout& l, Justification newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_),
|
||||
oldState (comp->getJustificationType())
|
||||
{
|
||||
|
|
@ -455,8 +455,8 @@ private:
|
|||
class FontNameChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
FontNameChangeAction (Label* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
FontNameChangeAction (Label* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getProperties().getWithDefault ("typefaceName", FontPropertyComponent::getDefaultFont());
|
||||
|
|
@ -524,8 +524,8 @@ private:
|
|||
class FontSizeChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
FontSizeChangeAction (Label* const comp, ComponentLayout& layout, const float newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
FontSizeChangeAction (Label* const comp, ComponentLayout& l, const float newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getFont().getHeight();
|
||||
|
|
@ -610,8 +610,8 @@ private:
|
|||
class FontStyleChangeAction : public ComponentUndoableAction <Label>
|
||||
{
|
||||
public:
|
||||
FontStyleChangeAction (Label* const comp, ComponentLayout& layout, const Font& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, layout),
|
||||
FontStyleChangeAction (Label* const comp, ComponentLayout& l, const Font& newState_)
|
||||
: ComponentUndoableAction <Label> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getFont();
|
||||
|
|
|
|||
|
|
@ -141,24 +141,24 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
Slider* s = dynamic_cast <Slider*> (component);
|
||||
jassert (s != 0);
|
||||
|
||||
properties.add (new SliderRangeProperty (s, document, "minimum", 0));
|
||||
properties.add (new SliderRangeProperty (s, document, "maximum", 1));
|
||||
properties.add (new SliderRangeProperty (s, document, "interval", 2));
|
||||
properties.add (new SliderTypeProperty (s, document));
|
||||
properties.add (new SliderTextboxProperty (s, document));
|
||||
properties.add (new SliderTextboxEditableProperty (s, document));
|
||||
properties.add (new SliderTextboxSizeProperty (s, document, true));
|
||||
properties.add (new SliderTextboxSizeProperty (s, document, false));
|
||||
properties.add (new SliderSkewProperty (s, document));
|
||||
props.add (new SliderRangeProperty (s, document, "minimum", 0));
|
||||
props.add (new SliderRangeProperty (s, document, "maximum", 1));
|
||||
props.add (new SliderRangeProperty (s, document, "interval", 2));
|
||||
props.add (new SliderTypeProperty (s, document));
|
||||
props.add (new SliderTextboxProperty (s, document));
|
||||
props.add (new SliderTextboxEditableProperty (s, document));
|
||||
props.add (new SliderTextboxSizeProperty (s, document, true));
|
||||
props.add (new SliderTextboxSizeProperty (s, document, false));
|
||||
props.add (new SliderSkewProperty (s, document));
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
}
|
||||
|
||||
static bool needsCallback (Component*)
|
||||
|
|
@ -171,8 +171,8 @@ private:
|
|||
class SliderTypeProperty : public ComponentChoiceProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTypeProperty (Slider* slider, JucerDocument& document)
|
||||
: ComponentChoiceProperty <Slider> ("type", slider, document)
|
||||
SliderTypeProperty (Slider* slider, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <Slider> ("type", slider, doc)
|
||||
{
|
||||
choices.add ("Linear Horizontal");
|
||||
choices.add ("Linear Vertical");
|
||||
|
|
@ -236,8 +236,8 @@ private:
|
|||
class SliderTypeChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTypeChangeAction (Slider* const comp, ComponentLayout& layout, const Slider::SliderStyle newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, layout),
|
||||
SliderTypeChangeAction (Slider* const comp, ComponentLayout& l, const Slider::SliderStyle newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getSliderStyle();
|
||||
|
|
@ -267,8 +267,8 @@ private:
|
|||
class SliderTextboxProperty : public ComponentChoiceProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTextboxProperty (Slider* slider, JucerDocument& document)
|
||||
: ComponentChoiceProperty <Slider> ("text position", slider, document)
|
||||
SliderTextboxProperty (Slider* slider, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <Slider> ("text position", slider, doc)
|
||||
{
|
||||
choices.add ("No text box");
|
||||
choices.add ("Text box on left");
|
||||
|
|
@ -311,8 +311,8 @@ private:
|
|||
class SliderTextBoxChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTextBoxChangeAction (Slider* const comp, ComponentLayout& layout, const Slider::TextEntryBoxPosition newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, layout),
|
||||
SliderTextBoxChangeAction (Slider* const comp, ComponentLayout& l, const Slider::TextEntryBoxPosition newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getTextBoxPosition();
|
||||
|
|
@ -348,8 +348,8 @@ private:
|
|||
class SliderTextboxEditableProperty : public ComponentBooleanProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTextboxEditableProperty (Slider* slider, JucerDocument& document)
|
||||
: ComponentBooleanProperty <Slider> ("text box mode", "Editable", "Editable", slider, document)
|
||||
SliderTextboxEditableProperty (Slider* slider, JucerDocument& doc)
|
||||
: ComponentBooleanProperty <Slider> ("text box mode", "Editable", "Editable", slider, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -368,8 +368,8 @@ private:
|
|||
class SliderEditableChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderEditableChangeAction (Slider* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, layout),
|
||||
SliderEditableChangeAction (Slider* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <Slider> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isTextBoxEditable();
|
||||
|
|
@ -399,9 +399,9 @@ private:
|
|||
class SliderTextboxSizeProperty : public ComponentTextProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderTextboxSizeProperty (Slider* slider, JucerDocument& document, const bool isWidth_)
|
||||
SliderTextboxSizeProperty (Slider* slider, JucerDocument& doc, const bool isWidth_)
|
||||
: ComponentTextProperty <Slider> (isWidth_ ? "text box width" : "text box height",
|
||||
12, false, slider, document),
|
||||
12, false, slider, doc),
|
||||
isWidth (isWidth_)
|
||||
{
|
||||
}
|
||||
|
|
@ -424,8 +424,8 @@ private:
|
|||
class SliderBoxSizeChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderBoxSizeChangeAction (Slider* const comp, ComponentLayout& layout, const bool isWidth_, int newSize_)
|
||||
: ComponentUndoableAction <Slider> (comp, layout),
|
||||
SliderBoxSizeChangeAction (Slider* const comp, ComponentLayout& l, const bool isWidth_, int newSize_)
|
||||
: ComponentUndoableAction <Slider> (comp, l),
|
||||
isWidth (isWidth_),
|
||||
newSize (newSize_)
|
||||
{
|
||||
|
|
@ -480,9 +480,9 @@ private:
|
|||
class SliderRangeProperty : public ComponentTextProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderRangeProperty (Slider* slider, JucerDocument& document,
|
||||
SliderRangeProperty (Slider* slider, JucerDocument& doc,
|
||||
const String& name, const int rangeParam_)
|
||||
: ComponentTextProperty <Slider> (name, 15, false, slider, document),
|
||||
: ComponentTextProperty <Slider> (name, 15, false, slider, doc),
|
||||
rangeParam (rangeParam_)
|
||||
{
|
||||
}
|
||||
|
|
@ -522,8 +522,8 @@ private:
|
|||
class SliderRangeChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderRangeChangeAction (Slider* const comp, ComponentLayout& layout, const double newState_[3])
|
||||
: ComponentUndoableAction <Slider> (comp, layout)
|
||||
SliderRangeChangeAction (Slider* const comp, ComponentLayout& l, const double newState_[3])
|
||||
: ComponentUndoableAction <Slider> (comp, l)
|
||||
{
|
||||
newState [0] = newState_ [0];
|
||||
newState [1] = newState_ [1];
|
||||
|
|
@ -558,8 +558,8 @@ private:
|
|||
class SliderSkewProperty : public ComponentTextProperty <Slider>
|
||||
{
|
||||
public:
|
||||
SliderSkewProperty (Slider* slider, JucerDocument& document)
|
||||
: ComponentTextProperty <Slider> ("skew factor", 12, false, slider, document)
|
||||
SliderSkewProperty (Slider* slider, JucerDocument& doc)
|
||||
: ComponentTextProperty <Slider> ("skew factor", 12, false, slider, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -583,8 +583,8 @@ private:
|
|||
class SliderSkewChangeAction : public ComponentUndoableAction <Slider>
|
||||
{
|
||||
public:
|
||||
SliderSkewChangeAction (Slider* const comp, ComponentLayout& layout, const double newValue_)
|
||||
: ComponentUndoableAction <Slider> (comp, layout)
|
||||
SliderSkewChangeAction (Slider* const comp, ComponentLayout& l, const double newValue_)
|
||||
: ComponentUndoableAction <Slider> (comp, l)
|
||||
{
|
||||
newValue = newValue_;
|
||||
oldValue = comp->getSkewFactor();
|
||||
|
|
|
|||
|
|
@ -45,14 +45,10 @@ public:
|
|||
TabbedComponent* const t = dynamic_cast <TabbedComponent*> (comp);
|
||||
XmlElement* const e = ComponentTypeHandler::createXmlFor (comp, layout);
|
||||
|
||||
if (t->getOrientation() == TabbedButtonBar::TabsAtTop)
|
||||
e->setAttribute ("orientation", "top");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtBottom)
|
||||
e->setAttribute ("orientation", "bottom");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtLeft)
|
||||
e->setAttribute ("orientation", "left");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtRight)
|
||||
e->setAttribute ("orientation", "right");
|
||||
if (t->getOrientation() == TabbedButtonBar::TabsAtTop) e->setAttribute ("orientation", "top");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtBottom) e->setAttribute ("orientation", "bottom");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtLeft) e->setAttribute ("orientation", "left");
|
||||
else if (t->getOrientation() == TabbedButtonBar::TabsAtRight) e->setAttribute ("orientation", "right");
|
||||
|
||||
e->setAttribute ("tabBarDepth", t->getTabBarDepth());
|
||||
e->setAttribute ("initialTab", t->getCurrentTabIndex());
|
||||
|
|
@ -70,14 +66,10 @@ public:
|
|||
|
||||
TabbedComponent* const t = dynamic_cast <TabbedComponent*> (comp);
|
||||
|
||||
if (xml.getStringAttribute ("orientation") == "top")
|
||||
t->setOrientation (TabbedButtonBar::TabsAtTop);
|
||||
else if (xml.getStringAttribute ("orientation") == "bottom")
|
||||
t->setOrientation (TabbedButtonBar::TabsAtBottom);
|
||||
else if (xml.getStringAttribute ("orientation") == "left")
|
||||
t->setOrientation (TabbedButtonBar::TabsAtLeft);
|
||||
else if (xml.getStringAttribute ("orientation") == "right")
|
||||
t->setOrientation (TabbedButtonBar::TabsAtRight);
|
||||
if (xml.getStringAttribute ("orientation") == "top") t->setOrientation (TabbedButtonBar::TabsAtTop);
|
||||
else if (xml.getStringAttribute ("orientation") == "bottom") t->setOrientation (TabbedButtonBar::TabsAtBottom);
|
||||
else if (xml.getStringAttribute ("orientation") == "left") t->setOrientation (TabbedButtonBar::TabsAtLeft);
|
||||
else if (xml.getStringAttribute ("orientation") == "right") t->setOrientation (TabbedButtonBar::TabsAtRight);
|
||||
|
||||
TabbedComponent defaultTabComp (TabbedButtonBar::TabsAtTop);
|
||||
|
||||
|
|
@ -96,29 +88,27 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& doc, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, doc, props);
|
||||
|
||||
TabbedComponent* const t = dynamic_cast <TabbedComponent*> (component);
|
||||
|
||||
properties.add (new TabOrientationProperty (t, document));
|
||||
properties.add (new TabDepthProperty (t, document));
|
||||
props.add (new TabOrientationProperty (t, doc));
|
||||
props.add (new TabDepthProperty (t, doc));
|
||||
|
||||
if (t->getNumTabs() > 0)
|
||||
properties.add (new TabInitialTabProperty (t, document));
|
||||
props.add (new TabInitialTabProperty (t, doc));
|
||||
|
||||
properties.add (new TabAddTabProperty (t, document));
|
||||
props.add (new TabAddTabProperty (t, doc));
|
||||
|
||||
if (t->getNumTabs() > 0)
|
||||
properties.add (new TabRemoveTabProperty (t, document));
|
||||
props.add (new TabRemoveTabProperty (t, doc));
|
||||
}
|
||||
|
||||
void addPropertiesToPropertyPanel (Component* comp,
|
||||
JucerDocument& document,
|
||||
PropertyPanel& panel)
|
||||
void addPropertiesToPropertyPanel (Component* comp, JucerDocument& doc, PropertyPanel& panel)
|
||||
{
|
||||
ComponentTypeHandler::addPropertiesToPropertyPanel (comp, document, panel);
|
||||
ComponentTypeHandler::addPropertiesToPropertyPanel (comp, doc, panel);
|
||||
|
||||
TabbedComponent* const t = dynamic_cast <TabbedComponent*> (comp);
|
||||
|
||||
|
|
@ -126,19 +116,19 @@ public:
|
|||
{
|
||||
Array <PropertyComponent*> properties;
|
||||
|
||||
properties.add (new TabNameProperty (t, document, i));
|
||||
properties.add (new TabColourProperty (t, document, i));
|
||||
properties.add (new TabNameProperty (t, doc, i));
|
||||
properties.add (new TabColourProperty (t, doc, i));
|
||||
|
||||
properties.add (new TabContentTypeProperty (t, document, i));
|
||||
properties.add (new TabContentTypeProperty (t, doc, i));
|
||||
|
||||
if (isTabUsingJucerComp (t, i))
|
||||
properties.add (new TabJucerFileProperty (t, document, i));
|
||||
properties.add (new TabJucerFileProperty (t, doc, i));
|
||||
else
|
||||
properties.add (new TabContentClassProperty (t, document, i));
|
||||
properties.add (new TabContentClassProperty (t, doc, i));
|
||||
|
||||
properties.add (new TabContentConstructorParamsProperty (t, document, i));
|
||||
properties.add (new TabContentConstructorParamsProperty (t, doc, i));
|
||||
|
||||
properties.add (new TabMoveProperty (t, document, i, t->getNumTabs()));
|
||||
properties.add (new TabMoveProperty (t, doc, i, t->getNumTabs()));
|
||||
|
||||
panel.addSection ("Tab " + String (i), properties);
|
||||
}
|
||||
|
|
@ -409,8 +399,8 @@ private:
|
|||
class TabOrientationProperty : public ComponentChoiceProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabOrientationProperty (TabbedComponent* comp, JucerDocument& document)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("tab position", comp, document)
|
||||
TabOrientationProperty (TabbedComponent* comp, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("tab position", comp, doc)
|
||||
{
|
||||
choices.add ("Tabs at top");
|
||||
choices.add ("Tabs at bottom");
|
||||
|
|
@ -447,8 +437,8 @@ private:
|
|||
class TabOrienationChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabOrienationChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const TabbedButtonBar::Orientation newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabOrienationChangeAction (TabbedComponent* const comp, ComponentLayout& l, const TabbedButtonBar::Orientation newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getOrientation();
|
||||
|
|
@ -478,8 +468,8 @@ private:
|
|||
class TabInitialTabProperty : public ComponentChoiceProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabInitialTabProperty (TabbedComponent* comp, JucerDocument& document)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("initial tab", comp, document)
|
||||
TabInitialTabProperty (TabbedComponent* comp, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("initial tab", comp, doc)
|
||||
{
|
||||
for (int i = 0; i < comp->getNumTabs(); ++i)
|
||||
choices.add ("Tab " + String (i) + ": \"" + comp->getTabNames() [i] + "\"");
|
||||
|
|
@ -500,8 +490,8 @@ private:
|
|||
class InitialTabChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
InitialTabChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
InitialTabChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
oldValue = comp->getCurrentTabIndex();
|
||||
|
|
@ -571,8 +561,8 @@ private:
|
|||
class TabDepthChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabDepthChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabDepthChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getTabBarDepth();
|
||||
|
|
@ -627,8 +617,8 @@ private:
|
|||
class AddTabAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
AddTabAction (TabbedComponent* const comp, ComponentLayout& layout)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout)
|
||||
AddTabAction (TabbedComponent* const comp, ComponentLayout& l)
|
||||
: ComponentUndoableAction<TabbedComponent> (comp, l)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -693,8 +683,8 @@ private:
|
|||
class RemoveTabAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
RemoveTabAction (TabbedComponent* const comp, ComponentLayout& layout, int indexToRemove_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
RemoveTabAction (TabbedComponent* const comp, ComponentLayout& l, int indexToRemove_)
|
||||
: ComponentUndoableAction<TabbedComponent> (comp, l),
|
||||
indexToRemove (indexToRemove_)
|
||||
{
|
||||
previousState = getTabState (comp, indexToRemove);
|
||||
|
|
@ -730,8 +720,8 @@ private:
|
|||
class TabNameProperty : public ComponentTextProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabNameProperty (TabbedComponent* comp, JucerDocument& document, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("name", 200, false, comp, document),
|
||||
TabNameProperty (TabbedComponent* comp, JucerDocument& doc, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("name", 200, false, comp, doc),
|
||||
tabIndex (tabIndex_)
|
||||
{
|
||||
}
|
||||
|
|
@ -753,8 +743,8 @@ private:
|
|||
class TabNameChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabNameChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabNameChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newValue (newValue_)
|
||||
{
|
||||
|
|
@ -830,9 +820,9 @@ private:
|
|||
class TabColourChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabColourChangeAction (TabbedComponent* comp, ComponentLayout& layout,
|
||||
TabColourChangeAction (TabbedComponent* comp, ComponentLayout& l,
|
||||
int tabIndex_, Colour newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newValue (newValue_)
|
||||
{
|
||||
|
|
@ -865,8 +855,8 @@ private:
|
|||
class TabContentTypeProperty : public ComponentChoiceProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabContentTypeProperty (TabbedComponent* comp, JucerDocument& document, const int tabIndex_)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("content type", comp, document),
|
||||
TabContentTypeProperty (TabbedComponent* comp, JucerDocument& doc, const int tabIndex_)
|
||||
: ComponentChoiceProperty <TabbedComponent> ("content type", comp, doc),
|
||||
tabIndex (tabIndex_)
|
||||
{
|
||||
choices.add ("Jucer content component");
|
||||
|
|
@ -890,8 +880,8 @@ private:
|
|||
class TabContentTypeChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabContentTypeChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const bool newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabContentTypeChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int tabIndex_, const bool newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newValue (newValue_)
|
||||
{
|
||||
|
|
@ -965,8 +955,8 @@ private:
|
|||
class JucerCompFileChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
JucerCompFileChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const String& newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
JucerCompFileChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int tabIndex_, const String& newState_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newState (newState_)
|
||||
{
|
||||
|
|
@ -998,8 +988,8 @@ private:
|
|||
class TabContentClassProperty : public ComponentTextProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabContentClassProperty (TabbedComponent* comp, JucerDocument& document, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("content class", 256, false, comp, document),
|
||||
TabContentClassProperty (TabbedComponent* comp, JucerDocument& doc, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("content class", 256, false, comp, doc),
|
||||
tabIndex (tabIndex_)
|
||||
{
|
||||
}
|
||||
|
|
@ -1021,8 +1011,8 @@ private:
|
|||
class TabClassNameChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabClassNameChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabClassNameChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newValue (newValue_)
|
||||
{
|
||||
|
|
@ -1056,8 +1046,8 @@ private:
|
|||
class TabContentConstructorParamsProperty : public ComponentTextProperty <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabContentConstructorParamsProperty (TabbedComponent* comp, JucerDocument& document, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("constructor params", 512, false, comp, document),
|
||||
TabContentConstructorParamsProperty (TabbedComponent* comp, JucerDocument& doc, const int tabIndex_)
|
||||
: ComponentTextProperty <TabbedComponent> ("constructor params", 512, false, comp, doc),
|
||||
tabIndex (tabIndex_)
|
||||
{
|
||||
}
|
||||
|
|
@ -1079,8 +1069,8 @@ private:
|
|||
class TabConstructorParamChangeAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
TabConstructorParamChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
TabConstructorParamChangeAction (TabbedComponent* const comp, ComponentLayout& l, const int tabIndex_, const String& newValue_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
tabIndex (tabIndex_),
|
||||
newValue (newValue_)
|
||||
{
|
||||
|
|
@ -1151,9 +1141,9 @@ private:
|
|||
class MoveTabAction : public ComponentUndoableAction <TabbedComponent>
|
||||
{
|
||||
public:
|
||||
MoveTabAction (TabbedComponent* const comp, ComponentLayout& layout,
|
||||
MoveTabAction (TabbedComponent* const comp, ComponentLayout& l,
|
||||
const int oldIndex_, const int newIndex_)
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, layout),
|
||||
: ComponentUndoableAction <TabbedComponent> (comp, l),
|
||||
oldIndex (oldIndex_),
|
||||
newIndex (newIndex_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ public:
|
|||
return new TextButton ("new button", String::empty);
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ButtonHandler::getEditableProperties (component, document, properties);
|
||||
ButtonHandler::getEditableProperties (component, document, props);
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
}
|
||||
|
||||
XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout)
|
||||
|
|
|
|||
|
|
@ -79,21 +79,21 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
TextEditor* const t = dynamic_cast <TextEditor*> (component);
|
||||
jassert (t != nullptr);
|
||||
|
||||
properties.add (new TextEditorInitialTextProperty (t, document));
|
||||
properties.add (new TextEditorMultiLineProperty (t, document));
|
||||
properties.add (new TextEditorReadOnlyProperty (t, document));
|
||||
properties.add (new TextEditorScrollbarsProperty (t, document));
|
||||
properties.add (new TextEditorCaretProperty (t, document));
|
||||
properties.add (new TextEditorPopupMenuProperty (t, document));
|
||||
props.add (new TextEditorInitialTextProperty (t, document));
|
||||
props.add (new TextEditorMultiLineProperty (t, document));
|
||||
props.add (new TextEditorReadOnlyProperty (t, document));
|
||||
props.add (new TextEditorScrollbarsProperty (t, document));
|
||||
props.add (new TextEditorCaretProperty (t, document));
|
||||
props.add (new TextEditorPopupMenuProperty (t, document));
|
||||
|
||||
addColourProperties (t, document, properties);
|
||||
addColourProperties (t, document, props);
|
||||
}
|
||||
|
||||
String getCreationParameters (Component* component)
|
||||
|
|
@ -149,8 +149,8 @@ private:
|
|||
class TextEditorMultilineChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorMultilineChangeAction (TextEditor* const comp, ComponentLayout& layout, const int newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorMultilineChangeAction (TextEditor* const comp, ComponentLayout& l, const int newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isMultiLine() ? (comp->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
|
||||
|
|
@ -199,8 +199,8 @@ private:
|
|||
class TextEditorReadonlyChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorReadonlyChangeAction (TextEditor* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorReadonlyChangeAction (TextEditor* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isReadOnly();
|
||||
|
|
@ -247,8 +247,8 @@ private:
|
|||
class TextEditorScrollbarChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorScrollbarChangeAction (TextEditor* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorScrollbarChangeAction (TextEditor* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->areScrollbarsShown();
|
||||
|
|
@ -295,8 +295,8 @@ private:
|
|||
class TextEditorCaretChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorCaretChangeAction (TextEditor* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorCaretChangeAction (TextEditor* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isCaretVisible();
|
||||
|
|
@ -343,8 +343,8 @@ private:
|
|||
class TextEditorPopupMenuChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorPopupMenuChangeAction (TextEditor* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorPopupMenuChangeAction (TextEditor* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isPopupMenuEnabled();
|
||||
|
|
@ -393,8 +393,8 @@ private:
|
|||
class TextEditorInitialTextChangeAction : public ComponentUndoableAction <TextEditor>
|
||||
{
|
||||
public:
|
||||
TextEditorInitialTextChangeAction (TextEditor* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, layout),
|
||||
TextEditorInitialTextChangeAction (TextEditor* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <TextEditor> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getProperties() ["initialText"];
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ public:
|
|||
return new ToggleButton ("new toggle button");
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ButtonHandler::getEditableProperties (component, document, properties);
|
||||
ButtonHandler::getEditableProperties (component, document, props);
|
||||
|
||||
properties.add (new ToggleButtonStateProperty ((ToggleButton*) component, document));
|
||||
props.add (new ToggleButtonStateProperty ((ToggleButton*) component, document));
|
||||
|
||||
addColourProperties (component, document, properties);
|
||||
addColourProperties (component, document, props);
|
||||
}
|
||||
|
||||
XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout)
|
||||
|
|
@ -107,8 +107,8 @@ private:
|
|||
class ToggleStateChangeAction : public ComponentUndoableAction <ToggleButton>
|
||||
{
|
||||
public:
|
||||
ToggleStateChangeAction (ToggleButton* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <ToggleButton> (comp, layout),
|
||||
ToggleStateChangeAction (ToggleButton* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <ToggleButton> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getToggleState();
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
TreeView* const t = dynamic_cast <TreeView*> (component);
|
||||
|
||||
properties.add (new TreeViewRootItemProperty (t, document));
|
||||
properties.add (new TreeViewRootOpennessProperty (t, document));
|
||||
props.add (new TreeViewRootItemProperty (t, document));
|
||||
props.add (new TreeViewRootOpennessProperty (t, document));
|
||||
|
||||
addColourProperties (t, document, properties);
|
||||
addColourProperties (t, document, props);
|
||||
}
|
||||
|
||||
String getCreationParameters (Component* comp)
|
||||
|
|
@ -153,8 +153,8 @@ private:
|
|||
class TreeViewRootItemProperty : public ComponentBooleanProperty <TreeView>
|
||||
{
|
||||
public:
|
||||
TreeViewRootItemProperty (TreeView* comp, JucerDocument& document)
|
||||
: ComponentBooleanProperty <TreeView> ("show root item", "Root item visible", "Root item visible", comp, document)
|
||||
TreeViewRootItemProperty (TreeView* comp, JucerDocument& doc)
|
||||
: ComponentBooleanProperty <TreeView> ("show root item", "Root item visible", "Root item visible", comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -173,8 +173,8 @@ private:
|
|||
class TreeviewRootChangeAction : public ComponentUndoableAction <TreeView>
|
||||
{
|
||||
public:
|
||||
TreeviewRootChangeAction (TreeView* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TreeView> (comp, layout),
|
||||
TreeviewRootChangeAction (TreeView* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TreeView> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->isRootItemVisible();
|
||||
|
|
@ -204,8 +204,8 @@ private:
|
|||
class TreeViewRootOpennessProperty : public ComponentChoiceProperty <TreeView>
|
||||
{
|
||||
public:
|
||||
TreeViewRootOpennessProperty (TreeView* comp, JucerDocument& document)
|
||||
: ComponentChoiceProperty <TreeView> ("default openness", comp, document)
|
||||
TreeViewRootOpennessProperty (TreeView* comp, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <TreeView> ("default openness", comp, doc)
|
||||
{
|
||||
choices.add ("Items open by default");
|
||||
choices.add ("Items closed by default");
|
||||
|
|
@ -226,8 +226,8 @@ private:
|
|||
class TreeviewOpennessChangeAction : public ComponentUndoableAction <TreeView>
|
||||
{
|
||||
public:
|
||||
TreeviewOpennessChangeAction (TreeView* const comp, ComponentLayout& layout, const bool newState_)
|
||||
: ComponentUndoableAction <TreeView> (comp, layout),
|
||||
TreeviewOpennessChangeAction (TreeView* const comp, ComponentLayout& l, const bool newState_)
|
||||
: ComponentUndoableAction <TreeView> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->areItemsOpenByDefault();
|
||||
|
|
|
|||
|
|
@ -74,26 +74,26 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props)
|
||||
{
|
||||
ComponentTypeHandler::getEditableProperties (component, document, properties);
|
||||
ComponentTypeHandler::getEditableProperties (component, document, props);
|
||||
|
||||
Viewport* const v = dynamic_cast <Viewport*> (component);
|
||||
|
||||
properties.add (new ViewportScrollbarShownProperty (v, document, true));
|
||||
properties.add (new ViewportScrollbarShownProperty (v, document, false));
|
||||
properties.add (new ViewportScrollbarSizeProperty (v, document));
|
||||
properties.add (new ViewportContentTypeProperty (v, document));
|
||||
props.add (new ViewportScrollbarShownProperty (v, document, true));
|
||||
props.add (new ViewportScrollbarShownProperty (v, document, false));
|
||||
props.add (new ViewportScrollbarSizeProperty (v, document));
|
||||
props.add (new ViewportContentTypeProperty (v, document));
|
||||
|
||||
if (getViewportContentType (v) == 1)
|
||||
{
|
||||
properties.add (new ViewportJucerFileProperty (v, document));
|
||||
properties.add (new ConstructorParamsProperty (v, document));
|
||||
props.add (new ViewportJucerFileProperty (v, document));
|
||||
props.add (new ConstructorParamsProperty (v, document));
|
||||
}
|
||||
else if (getViewportContentType (v) == 2)
|
||||
{
|
||||
properties.add (new ViewportContentClassProperty (v, document));
|
||||
properties.add (new ConstructorParamsProperty (v, document));
|
||||
props.add (new ViewportContentClassProperty (v, document));
|
||||
props.add (new ConstructorParamsProperty (v, document));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ public:
|
|||
|
||||
if (getViewportContentType (v) != 0)
|
||||
{
|
||||
String className (getViewportGenericComponentClass (v));
|
||||
String classNm (getViewportGenericComponentClass (v));
|
||||
|
||||
if (getViewportContentType (v) == 1)
|
||||
{
|
||||
|
|
@ -146,19 +146,19 @@ public:
|
|||
.getRelativePathFrom (code.document->getCppFile().getParentDirectory())
|
||||
.replaceCharacter ('\\', '/'));
|
||||
|
||||
className = doc->getClassName();
|
||||
classNm = doc->getClassName();
|
||||
}
|
||||
else
|
||||
{
|
||||
className = String::empty;
|
||||
classNm = String::empty;
|
||||
}
|
||||
}
|
||||
|
||||
if (className.isNotEmpty())
|
||||
if (classNm.isNotEmpty())
|
||||
{
|
||||
code.constructorCode
|
||||
<< memberVariableName << "->setViewedComponent (new "
|
||||
<< className;
|
||||
<< classNm;
|
||||
|
||||
if (getViewportConstructorParams (v).trim().isNotEmpty())
|
||||
{
|
||||
|
|
@ -286,10 +286,10 @@ private:
|
|||
class ViewportScrollbarShownProperty : public ComponentBooleanProperty <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportScrollbarShownProperty (Viewport* comp, JucerDocument& document, const bool vertical_)
|
||||
ViewportScrollbarShownProperty (Viewport* comp, JucerDocument& doc, const bool vertical_)
|
||||
: ComponentBooleanProperty <Viewport> (vertical_ ? "V scrollbar" : "H scrollbar",
|
||||
"enabled", "enabled",
|
||||
comp, document),
|
||||
comp, doc),
|
||||
vertical (vertical_)
|
||||
{
|
||||
}
|
||||
|
|
@ -312,8 +312,8 @@ private:
|
|||
class ViewportScrollbarChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportScrollbarChangeAction (Viewport* const comp, ComponentLayout& layout, const bool vertical_, const bool newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
ViewportScrollbarChangeAction (Viewport* const comp, ComponentLayout& l, const bool vertical_, const bool newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
vertical (vertical_),
|
||||
newState (newState_)
|
||||
{
|
||||
|
|
@ -392,8 +392,8 @@ private:
|
|||
class ViewportScrollbarSizeChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportScrollbarSizeChangeAction (Viewport* const comp, ComponentLayout& layout, const int newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
ViewportScrollbarSizeChangeAction (Viewport* const comp, ComponentLayout& l, const int newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = comp->getScrollBarThickness();
|
||||
|
|
@ -423,8 +423,8 @@ private:
|
|||
class ViewportContentTypeProperty : public ComponentChoiceProperty <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportContentTypeProperty (Viewport* comp, JucerDocument& document)
|
||||
: ComponentChoiceProperty <Viewport> ("content", comp, document)
|
||||
ViewportContentTypeProperty (Viewport* comp, JucerDocument& doc)
|
||||
: ComponentChoiceProperty <Viewport> ("content", comp, doc)
|
||||
{
|
||||
choices.add ("No content component");
|
||||
choices.add ("Jucer content component");
|
||||
|
|
@ -446,8 +446,8 @@ private:
|
|||
class ViewportContentTypeChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportContentTypeChangeAction (Viewport* const comp, ComponentLayout& layout, const int newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
ViewportContentTypeChangeAction (Viewport* const comp, ComponentLayout& l, const int newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
oldValue = getViewportContentType (comp);
|
||||
|
|
@ -523,8 +523,8 @@ private:
|
|||
class JucerCompFileChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
JucerCompFileChangeAction (Viewport* const comp, ComponentLayout& layout, const String& newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
JucerCompFileChangeAction (Viewport* const comp, ComponentLayout& l, const String& newState_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
newState (newState_)
|
||||
{
|
||||
oldState = getViewportJucerComponentFile (comp);
|
||||
|
|
@ -554,8 +554,8 @@ private:
|
|||
class ViewportContentClassProperty : public ComponentTextProperty <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportContentClassProperty (Viewport* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <Viewport> ("content class", 256, false, comp, document)
|
||||
ViewportContentClassProperty (Viewport* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <Viewport> ("content class", 256, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -574,8 +574,8 @@ private:
|
|||
class ViewportClassNameChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
ViewportClassNameChangeAction (Viewport* const comp, ComponentLayout& layout, const String& newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
ViewportClassNameChangeAction (Viewport* const comp, ComponentLayout& l, const String& newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
oldValue = getViewportGenericComponentClass (comp);
|
||||
|
|
@ -607,8 +607,8 @@ private:
|
|||
class ConstructorParamsProperty : public ComponentTextProperty <Viewport>
|
||||
{
|
||||
public:
|
||||
ConstructorParamsProperty (Viewport* comp, JucerDocument& document)
|
||||
: ComponentTextProperty <Viewport> ("constructor params", 512, false, comp, document)
|
||||
ConstructorParamsProperty (Viewport* comp, JucerDocument& doc)
|
||||
: ComponentTextProperty <Viewport> ("constructor params", 512, false, comp, doc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -627,8 +627,8 @@ private:
|
|||
class ConstructorParamChangeAction : public ComponentUndoableAction <Viewport>
|
||||
{
|
||||
public:
|
||||
ConstructorParamChangeAction (Viewport* const comp, ComponentLayout& layout, const String& newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, layout),
|
||||
ConstructorParamChangeAction (Viewport* const comp, ComponentLayout& l, const String& newValue_)
|
||||
: ComponentUndoableAction <Viewport> (comp, l),
|
||||
newValue (newValue_)
|
||||
{
|
||||
oldValue = getViewportConstructorParams (comp);
|
||||
|
|
|
|||
|
|
@ -225,12 +225,12 @@ void BinaryResources::loadFromCpp (const File& cppFileLocation, const String& cp
|
|||
tokens.removeEmptyStrings();
|
||||
|
||||
const String resourceName (tokens[0]);
|
||||
const int size = tokens[1].getIntValue();
|
||||
const int resourceSize = tokens[1].getIntValue();
|
||||
const String originalFileName (cppFileLocation.getSiblingFile (tokens[2].unquoted()).getFullPathName());
|
||||
|
||||
jassert (resourceName.isNotEmpty() && size > 0);
|
||||
jassert (resourceName.isNotEmpty() && resourceSize > 0);
|
||||
|
||||
if (resourceName.isNotEmpty() && size > 0)
|
||||
if (resourceName.isNotEmpty() && resourceSize > 0)
|
||||
{
|
||||
const int firstLine = i;
|
||||
|
||||
|
|
@ -260,10 +260,10 @@ void BinaryResources::loadFromCpp (const File& cppFileLocation, const String& cp
|
|||
break;
|
||||
}
|
||||
|
||||
jassert (size < (int) out.getDataSize() && size > (int) out.getDataSize() - 2);
|
||||
jassert (resourceSize < (int) out.getDataSize() && resourceSize > (int) out.getDataSize() - 2);
|
||||
|
||||
MemoryBlock mb (out.getData(), out.getDataSize());
|
||||
mb.setSize ((size_t) size);
|
||||
mb.setSize ((size_t) resourceSize);
|
||||
|
||||
add (resourceName, originalFileName, mb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ private:
|
|||
class DeleteCompAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
DeleteCompAction (Component* const comp, ComponentLayout& layout)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
DeleteCompAction (Component* const comp, ComponentLayout& l)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
oldIndex (-1)
|
||||
{
|
||||
if (ComponentTypeHandler* const h = ComponentTypeHandler::getHandlerFor (*comp))
|
||||
|
|
@ -132,7 +132,7 @@ public:
|
|||
else
|
||||
jassertfalse;
|
||||
|
||||
oldIndex = layout.indexOfComponent (comp);
|
||||
oldIndex = l.indexOfComponent (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
@ -181,11 +181,11 @@ void ComponentLayout::removeComponent (Component* comp, const bool undoable)
|
|||
class FrontBackCompAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
FrontBackCompAction (Component* const comp, ComponentLayout& layout, int newIndex_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
FrontBackCompAction (Component* const comp, ComponentLayout& l, int newIndex_)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newIndex (newIndex_)
|
||||
{
|
||||
oldIndex = layout.indexOfComponent (comp);
|
||||
oldIndex = l.indexOfComponent (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
@ -531,12 +531,11 @@ void ComponentLayout::processRelativeTargetMenuResult (Component* comp, int whic
|
|||
class ChangeCompPositionAction : public ComponentUndoableAction <Component>
|
||||
{
|
||||
public:
|
||||
ChangeCompPositionAction (Component* const comp, ComponentLayout& layout,
|
||||
ChangeCompPositionAction (Component* const comp, ComponentLayout& l,
|
||||
const RelativePositionedRectangle& newPos_)
|
||||
: ComponentUndoableAction <Component> (comp, layout),
|
||||
newPos (newPos_)
|
||||
: ComponentUndoableAction <Component> (comp, l),
|
||||
newPos (newPos_), oldPos (ComponentTypeHandler::getComponentPosition (comp))
|
||||
{
|
||||
oldPos = ComponentTypeHandler::getComponentPosition (comp);
|
||||
}
|
||||
|
||||
bool perform()
|
||||
|
|
|
|||
|
|
@ -504,37 +504,37 @@ ColouredElement::~ColouredElement()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void ColouredElement::getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void ColouredElement::getEditableProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
PaintElement::getEditableProperties (properties);
|
||||
getColourSpecificProperties (properties);
|
||||
PaintElement::getEditableProperties (props);
|
||||
getColourSpecificProperties (props);
|
||||
}
|
||||
|
||||
void ColouredElement::getColourSpecificProperties (Array <PropertyComponent*>& properties)
|
||||
void ColouredElement::getColourSpecificProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new ElementFillModeProperty (this, false));
|
||||
props.add (new ElementFillModeProperty (this, false));
|
||||
|
||||
switch (getFillType().mode)
|
||||
{
|
||||
case JucerFillType::solidColour:
|
||||
properties.add (new ElementFillColourProperty ("colour", this, ElementFillColourProperty::solidColour, false));
|
||||
props.add (new ElementFillColourProperty ("colour", this, ElementFillColourProperty::solidColour, false));
|
||||
break;
|
||||
|
||||
case JucerFillType::linearGradient:
|
||||
case JucerFillType::radialGradient:
|
||||
properties.add (new ElementFillColourProperty ("colour 1", this, ElementFillColourProperty::gradientColour1, false));
|
||||
properties.add (new ElementFillPositionProperty (this, "x1", PositionPropertyBase::componentX, true, false));
|
||||
properties.add (new ElementFillPositionProperty (this, "y1", PositionPropertyBase::componentY, true, false));
|
||||
properties.add (new ElementFillColourProperty ("colour 2", this, ElementFillColourProperty::gradientColour2, false));
|
||||
properties.add (new ElementFillPositionProperty (this, "x2", PositionPropertyBase::componentX, false, false));
|
||||
properties.add (new ElementFillPositionProperty (this, "y2", PositionPropertyBase::componentY, false, false));
|
||||
props.add (new ElementFillColourProperty ("colour 1", this, ElementFillColourProperty::gradientColour1, false));
|
||||
props.add (new ElementFillPositionProperty (this, "x1", PositionPropertyBase::componentX, true, false));
|
||||
props.add (new ElementFillPositionProperty (this, "y1", PositionPropertyBase::componentY, true, false));
|
||||
props.add (new ElementFillColourProperty ("colour 2", this, ElementFillColourProperty::gradientColour2, false));
|
||||
props.add (new ElementFillPositionProperty (this, "x2", PositionPropertyBase::componentX, false, false));
|
||||
props.add (new ElementFillPositionProperty (this, "y2", PositionPropertyBase::componentY, false, false));
|
||||
break;
|
||||
|
||||
case JucerFillType::imageBrush:
|
||||
properties.add (new ImageBrushResourceProperty (this, false));
|
||||
properties.add (new ImageBrushPositionProperty (this, "anchor x", PositionPropertyBase::componentX, false));
|
||||
properties.add (new ImageBrushPositionProperty (this, "anchor y", PositionPropertyBase::componentY, false));
|
||||
properties.add (new ImageBrushOpacityProperty (this, false));
|
||||
props.add (new ImageBrushResourceProperty (this, false));
|
||||
props.add (new ImageBrushPositionProperty (this, "anchor x", PositionPropertyBase::componentX, false));
|
||||
props.add (new ImageBrushPositionProperty (this, "anchor y", PositionPropertyBase::componentY, false));
|
||||
props.add (new ImageBrushOpacityProperty (this, false));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -544,41 +544,41 @@ void ColouredElement::getColourSpecificProperties (Array <PropertyComponent*>& p
|
|||
|
||||
if (showOutline)
|
||||
{
|
||||
properties.add (new EnableStrokeProperty (this));
|
||||
props.add (new EnableStrokeProperty (this));
|
||||
|
||||
if (isStrokePresent)
|
||||
{
|
||||
properties.add (new StrokeThicknessProperty (this));
|
||||
props.add (new StrokeThicknessProperty (this));
|
||||
|
||||
if (showJointAndEnd)
|
||||
{
|
||||
properties.add (new StrokeJointProperty (this));
|
||||
properties.add (new StrokeEndCapProperty (this));
|
||||
props.add (new StrokeJointProperty (this));
|
||||
props.add (new StrokeEndCapProperty (this));
|
||||
}
|
||||
|
||||
properties.add (new ElementFillModeProperty (this, true));
|
||||
props.add (new ElementFillModeProperty (this, true));
|
||||
|
||||
switch (getStrokeType().fill.mode)
|
||||
{
|
||||
case JucerFillType::solidColour:
|
||||
properties.add (new ElementFillColourProperty ("colour", this, ElementFillColourProperty::solidColour, true));
|
||||
props.add (new ElementFillColourProperty ("colour", this, ElementFillColourProperty::solidColour, true));
|
||||
break;
|
||||
|
||||
case JucerFillType::linearGradient:
|
||||
case JucerFillType::radialGradient:
|
||||
properties.add (new ElementFillColourProperty ("colour 1", this, ElementFillColourProperty::gradientColour1, true));
|
||||
properties.add (new ElementFillPositionProperty (this, "x1", PositionPropertyBase::componentX, true, true));
|
||||
properties.add (new ElementFillPositionProperty (this, "y1", PositionPropertyBase::componentY, true, true));
|
||||
properties.add (new ElementFillColourProperty ("colour 2", this, ElementFillColourProperty::gradientColour2, true));
|
||||
properties.add (new ElementFillPositionProperty (this, "x2", PositionPropertyBase::componentX, false, true));
|
||||
properties.add (new ElementFillPositionProperty (this, "y2", PositionPropertyBase::componentY, false, true));
|
||||
props.add (new ElementFillColourProperty ("colour 1", this, ElementFillColourProperty::gradientColour1, true));
|
||||
props.add (new ElementFillPositionProperty (this, "x1", PositionPropertyBase::componentX, true, true));
|
||||
props.add (new ElementFillPositionProperty (this, "y1", PositionPropertyBase::componentY, true, true));
|
||||
props.add (new ElementFillColourProperty ("colour 2", this, ElementFillColourProperty::gradientColour2, true));
|
||||
props.add (new ElementFillPositionProperty (this, "x2", PositionPropertyBase::componentX, false, true));
|
||||
props.add (new ElementFillPositionProperty (this, "y2", PositionPropertyBase::componentY, false, true));
|
||||
break;
|
||||
|
||||
case JucerFillType::imageBrush:
|
||||
properties.add (new ImageBrushResourceProperty (this, true));
|
||||
properties.add (new ImageBrushPositionProperty (this, "stroke anchor x", PositionPropertyBase::componentX, true));
|
||||
properties.add (new ImageBrushPositionProperty (this, "stroke anchor y", PositionPropertyBase::componentY, true));
|
||||
properties.add (new ImageBrushOpacityProperty (this, true));
|
||||
props.add (new ImageBrushResourceProperty (this, true));
|
||||
props.add (new ImageBrushPositionProperty (this, "stroke anchor x", PositionPropertyBase::componentX, true));
|
||||
props.add (new ImageBrushPositionProperty (this, "stroke anchor y", PositionPropertyBase::componentY, true));
|
||||
props.add (new ImageBrushOpacityProperty (this, true));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -845,13 +845,13 @@ void ColouredElement::createSiblingComponents()
|
|||
|
||||
Rectangle<int> ColouredElement::getCurrentBounds (const Rectangle<int>& parentArea) const
|
||||
{
|
||||
int border = 0;
|
||||
int borderSize = 0;
|
||||
|
||||
if (isStrokePresent)
|
||||
border = (int) strokeType.stroke.getStrokeThickness() / 2 + 1;
|
||||
borderSize = (int) strokeType.stroke.getStrokeThickness() / 2 + 1;
|
||||
|
||||
return position.getRectangle (parentArea, getDocument()->getComponentLayout())
|
||||
.expanded (border, border);
|
||||
.expanded (borderSize);
|
||||
}
|
||||
|
||||
void ColouredElement::setCurrentBounds (const Rectangle<int>& newBounds,
|
||||
|
|
@ -862,8 +862,7 @@ void ColouredElement::setCurrentBounds (const Rectangle<int>& newBounds,
|
|||
|
||||
if (isStrokePresent)
|
||||
{
|
||||
const int border = (int) strokeType.stroke.getStrokeThickness() / 2 + 1;
|
||||
r = r.expanded (-border, -border);
|
||||
r = r.expanded (-((int) strokeType.stroke.getStrokeThickness() / 2 + 1));
|
||||
|
||||
r.setSize (jmax (1, r.getWidth()), jmax (1, r.getHeight()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public:
|
|||
~ColouredElement();
|
||||
|
||||
//==============================================================================
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties);
|
||||
void getColourSpecificProperties (Array <PropertyComponent*>& properties);
|
||||
void getEditableProperties (Array<PropertyComponent*>& props);
|
||||
void getColourSpecificProperties (Array<PropertyComponent*>& props);
|
||||
|
||||
//==============================================================================
|
||||
const JucerFillType& getFillType() noexcept;
|
||||
|
|
|
|||
|
|
@ -199,12 +199,12 @@ public:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
void PaintElement::getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void PaintElement::getEditableProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new ElementPositionProperty (this, "x", PositionPropertyBase::componentX));
|
||||
properties.add (new ElementPositionProperty (this, "y", PositionPropertyBase::componentY));
|
||||
properties.add (new ElementPositionProperty (this, "width", PositionPropertyBase::componentWidth));
|
||||
properties.add (new ElementPositionProperty (this, "height", PositionPropertyBase::componentHeight));
|
||||
props.add (new ElementPositionProperty (this, "x", PositionPropertyBase::componentX));
|
||||
props.add (new ElementPositionProperty (this, "y", PositionPropertyBase::componentY));
|
||||
props.add (new ElementPositionProperty (this, "width", PositionPropertyBase::componentWidth));
|
||||
props.add (new ElementPositionProperty (this, "height", PositionPropertyBase::componentHeight));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -330,7 +330,7 @@ void PaintElement::resizeEnd()
|
|||
{
|
||||
}
|
||||
|
||||
void PaintElement::checkBounds (Rectangle<int>& bounds,
|
||||
void PaintElement::checkBounds (Rectangle<int>& b,
|
||||
const Rectangle<int>& previousBounds,
|
||||
const Rectangle<int>& limits,
|
||||
const bool isStretchingTop,
|
||||
|
|
@ -343,7 +343,7 @@ void PaintElement::checkBounds (Rectangle<int>& bounds,
|
|||
else
|
||||
setFixedAspectRatio (0.0);
|
||||
|
||||
ComponentBoundsConstrainer::checkBounds (bounds, previousBounds, limits, isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight);
|
||||
ComponentBoundsConstrainer::checkBounds (b, previousBounds, limits, isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight);
|
||||
|
||||
JucerDocument* document = getDocument();
|
||||
|
||||
|
|
@ -352,10 +352,10 @@ void PaintElement::checkBounds (Rectangle<int>& bounds,
|
|||
jassert (getParentComponent() != nullptr);
|
||||
const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea());
|
||||
|
||||
int x = bounds.getX();
|
||||
int y = bounds.getY();
|
||||
int w = bounds.getWidth();
|
||||
int h = bounds.getHeight();
|
||||
int x = b.getX();
|
||||
int y = b.getY();
|
||||
int w = b.getWidth();
|
||||
int h = b.getHeight();
|
||||
|
||||
x += borderThickness - area.getX();
|
||||
y += borderThickness - area.getY();
|
||||
|
|
@ -382,19 +382,19 @@ void PaintElement::checkBounds (Rectangle<int>& bounds,
|
|||
x -= borderThickness - area.getX();
|
||||
y -= borderThickness - area.getY();
|
||||
|
||||
bounds = Rectangle<int> (x, y, w, h);
|
||||
b = Rectangle<int> (x, y, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
void PaintElement::applyBoundsToComponent (Component*, const Rectangle<int>& bounds)
|
||||
void PaintElement::applyBoundsToComponent (Component*, const Rectangle<int>& newBounds)
|
||||
{
|
||||
if (getBounds() != bounds)
|
||||
if (getBounds() != newBounds)
|
||||
{
|
||||
getDocument()->getUndoManager().undoCurrentTransactionOnly();
|
||||
|
||||
jassert (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != nullptr);
|
||||
|
||||
setCurrentBounds (bounds.expanded (-borderThickness, -borderThickness),
|
||||
setCurrentBounds (newBounds.expanded (-borderThickness, -borderThickness),
|
||||
((PaintRoutineEditor*) getParentComponent())->getComponentArea(),
|
||||
true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
virtual void drawExtraEditorGraphics (Graphics& g, const Rectangle<int>& relativeTo);
|
||||
|
||||
virtual void getEditableProperties (Array <PropertyComponent*>& properties);
|
||||
virtual void getEditableProperties (Array<PropertyComponent*>& props);
|
||||
|
||||
virtual void showPopupMenu();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
class PaintElementEllipse : public ColouredElement
|
||||
{
|
||||
public:
|
||||
PaintElementEllipse (PaintRoutine* owner)
|
||||
: ColouredElement (owner, "Ellipse", true, false)
|
||||
PaintElementEllipse (PaintRoutine* pr)
|
||||
: ColouredElement (pr, "Ellipse", true, false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -53,10 +53,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array<PropertyComponent*>& props)
|
||||
{
|
||||
ColouredElement::getEditableProperties (properties);
|
||||
properties.add (new ShapeToPathProperty (this));
|
||||
ColouredElement::getEditableProperties (props);
|
||||
props.add (new ShapeToPathProperty (this));
|
||||
}
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
class PaintElementGroup : public PaintElement
|
||||
{
|
||||
public:
|
||||
PaintElementGroup (PaintRoutine* owner)
|
||||
: PaintElement (owner, "Group")
|
||||
PaintElementGroup (PaintRoutine* pr)
|
||||
: PaintElement (pr, "Group")
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -167,9 +167,9 @@ public:
|
|||
subElements.getUnchecked(i)->draw (g, layout, parentArea);
|
||||
}
|
||||
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array<PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new UngroupProperty (this));
|
||||
props.add (new UngroupProperty (this));
|
||||
}
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
class PaintElementImage : public PaintElement
|
||||
{
|
||||
public:
|
||||
PaintElementImage (PaintRoutine* owner)
|
||||
: PaintElement (owner, "Image"),
|
||||
PaintElementImage (PaintRoutine* pr)
|
||||
: PaintElement (pr, "Image"),
|
||||
opacity (1.0),
|
||||
mode (stretched)
|
||||
{
|
||||
|
|
@ -82,14 +82,14 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
PaintElement::getEditableProperties (properties);
|
||||
PaintElement::getEditableProperties (props);
|
||||
|
||||
properties.add (new ImageElementResourceProperty (this));
|
||||
properties.add (new StretchModeProperty (this));
|
||||
properties.add (new OpacityProperty (this));
|
||||
properties.add (new ResetSizeProperty (this));
|
||||
props.add (new ImageElementResourceProperty (this));
|
||||
props.add (new StretchModeProperty (this));
|
||||
props.add (new OpacityProperty (this));
|
||||
props.add (new ResetSizeProperty (this));
|
||||
}
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
|
|
@ -297,9 +297,10 @@ public:
|
|||
const Rectangle<int> parentArea (ed->getComponentArea());
|
||||
|
||||
Rectangle<int> r (getCurrentBounds (parentArea));
|
||||
Rectangle<float> bounds (image->getDrawableBounds());
|
||||
Rectangle<float> b (image->getDrawableBounds());
|
||||
|
||||
r.setSize ((int) (bounds.getWidth() + 0.999f), (int) (bounds.getHeight() + 0.999f));
|
||||
r.setSize ((int) (b.getWidth() + 0.999f),
|
||||
(int) (b.getHeight() + 0.999f));
|
||||
|
||||
setCurrentBounds (r, parentArea, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ private:
|
|||
|
||||
|
||||
//==============================================================================
|
||||
PaintElementPath::PaintElementPath (PaintRoutine* owner)
|
||||
: ColouredElement (owner, "Path", true, true),
|
||||
PaintElementPath::PaintElementPath (PaintRoutine* pr)
|
||||
: ColouredElement (pr, "Path", true, true),
|
||||
nonZeroWinding (true)
|
||||
{
|
||||
}
|
||||
|
|
@ -167,14 +167,14 @@ Rectangle<int> PaintElementPath::getCurrentBounds (const Rectangle<int>& parentA
|
|||
{
|
||||
updateStoredPath (getDocument()->getComponentLayout(), parentArea);
|
||||
|
||||
Rectangle<float> bounds (path.getBounds());
|
||||
Rectangle<float> r (path.getBounds());
|
||||
|
||||
const int borderSize = getBorderSize();
|
||||
|
||||
return Rectangle<int> ((int) bounds.getX() - borderSize,
|
||||
(int) bounds.getY() - borderSize,
|
||||
(int) bounds.getWidth() + borderSize * 2,
|
||||
(int) bounds.getHeight() + borderSize * 2);
|
||||
return Rectangle<int> ((int) r.getX() - borderSize,
|
||||
(int) r.getY() - borderSize,
|
||||
(int) r.getWidth() + borderSize * 2,
|
||||
(int) r.getHeight() + borderSize * 2);
|
||||
}
|
||||
|
||||
void PaintElementPath::setCurrentBounds (const Rectangle<int>& b,
|
||||
|
|
@ -347,10 +347,10 @@ void PaintElementPath::pointListChanged()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void PaintElementPath::getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void PaintElementPath::getEditableProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new PathWindingModeProperty (this));
|
||||
getColourSpecificProperties (properties);
|
||||
props.add (new PathWindingModeProperty (this));
|
||||
getColourSpecificProperties (props);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -1426,7 +1426,7 @@ void PathPoint::changePointType (const Path::Iterator::PathElementType newType,
|
|||
}
|
||||
}
|
||||
|
||||
void PathPoint::getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void PathPoint::getEditableProperties (Array<PropertyComponent*>& props)
|
||||
{
|
||||
const int index = owner->points.indexOf (this);
|
||||
jassert (index >= 0);
|
||||
|
|
@ -1434,38 +1434,38 @@ void PathPoint::getEditableProperties (Array <PropertyComponent*>& properties)
|
|||
switch (type)
|
||||
{
|
||||
case Path::Iterator::startNewSubPath:
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "y", PositionPropertyBase::componentY));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "y", PositionPropertyBase::componentY));
|
||||
|
||||
properties.add (new PathPointClosedProperty (owner, index));
|
||||
properties.add (new AddNewPointProperty (owner, index));
|
||||
props.add (new PathPointClosedProperty (owner, index));
|
||||
props.add (new AddNewPointProperty (owner, index));
|
||||
break;
|
||||
|
||||
case Path::Iterator::lineTo:
|
||||
properties.add (new PathPointTypeProperty (owner, index));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "y", PositionPropertyBase::componentY));
|
||||
properties.add (new AddNewPointProperty (owner, index));
|
||||
props.add (new PathPointTypeProperty (owner, index));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "y", PositionPropertyBase::componentY));
|
||||
props.add (new AddNewPointProperty (owner, index));
|
||||
break;
|
||||
|
||||
case Path::Iterator::quadraticTo:
|
||||
properties.add (new PathPointTypeProperty (owner, index));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "control pt x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "control pt y", PositionPropertyBase::componentY));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 1, "x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 1, "y", PositionPropertyBase::componentY));
|
||||
properties.add (new AddNewPointProperty (owner, index));
|
||||
props.add (new PathPointTypeProperty (owner, index));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "control pt x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "control pt y", PositionPropertyBase::componentY));
|
||||
props.add (new PathPointPositionProperty (owner, index, 1, "x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 1, "y", PositionPropertyBase::componentY));
|
||||
props.add (new AddNewPointProperty (owner, index));
|
||||
break;
|
||||
|
||||
case Path::Iterator::cubicTo:
|
||||
properties.add (new PathPointTypeProperty (owner, index));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "control pt1 x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 0, "control pt1 y", PositionPropertyBase::componentY));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 1, "control pt2 x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 1, "control pt2 y", PositionPropertyBase::componentY));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 2, "x", PositionPropertyBase::componentX));
|
||||
properties.add (new PathPointPositionProperty (owner, index, 2, "y", PositionPropertyBase::componentY));
|
||||
properties.add (new AddNewPointProperty (owner, index));
|
||||
props.add (new PathPointTypeProperty (owner, index));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "control pt1 x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 0, "control pt1 y", PositionPropertyBase::componentY));
|
||||
props.add (new PathPointPositionProperty (owner, index, 1, "control pt2 x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 1, "control pt2 y", PositionPropertyBase::componentY));
|
||||
props.add (new PathPointPositionProperty (owner, index, 2, "x", PositionPropertyBase::componentX));
|
||||
props.add (new PathPointPositionProperty (owner, index, 2, "y", PositionPropertyBase::componentY));
|
||||
props.add (new AddNewPointProperty (owner, index));
|
||||
break;
|
||||
|
||||
case Path::Iterator::closePath:
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
const bool undoable);
|
||||
|
||||
void deleteFromPath();
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties);
|
||||
void getEditableProperties (Array<PropertyComponent*>& props);
|
||||
|
||||
private:
|
||||
PathPoint withChangedPointType (const Path::Iterator::PathElementType newType,
|
||||
|
|
@ -97,7 +97,7 @@ public:
|
|||
void setNonZeroWinding (const bool nonZero, const bool undoable);
|
||||
|
||||
//==============================================================================
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties);
|
||||
void getEditableProperties (Array<PropertyComponent*>& props);
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
class PaintElementRectangle : public ColouredElement
|
||||
{
|
||||
public:
|
||||
PaintElementRectangle (PaintRoutine* owner)
|
||||
: ColouredElement (owner, "Rectangle", true, false)
|
||||
PaintElementRectangle (PaintRoutine* pr)
|
||||
: ColouredElement (pr, "Rectangle", true, false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -49,8 +49,8 @@ public:
|
|||
|
||||
void draw (Graphics& g, const ComponentLayout* layout, const Rectangle<int>& parentArea)
|
||||
{
|
||||
Component parentComponent;
|
||||
parentComponent.setBounds (parentArea);
|
||||
Component tempParentComp;
|
||||
tempParentComp.setBounds (parentArea);
|
||||
|
||||
fillType.setFillType (g, getDocument(), parentArea);
|
||||
|
||||
|
|
@ -66,11 +66,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array <PropertyComponent*>& props)
|
||||
{
|
||||
ColouredElement::getEditableProperties (properties);
|
||||
ColouredElement::getEditableProperties (props);
|
||||
|
||||
properties.add (new ShapeToPathProperty (this));
|
||||
props.add (new ShapeToPathProperty (this));
|
||||
}
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
class PaintElementRoundedRectangle : public ColouredElement
|
||||
{
|
||||
public:
|
||||
PaintElementRoundedRectangle (PaintRoutine* owner)
|
||||
: ColouredElement (owner, "Rounded Rectangle", true, false)
|
||||
PaintElementRoundedRectangle (PaintRoutine* pr)
|
||||
: ColouredElement (pr, "Rounded Rectangle", true, false)
|
||||
{
|
||||
cornerSize = 10.0;
|
||||
}
|
||||
|
|
@ -55,13 +55,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array<PropertyComponent*>& props)
|
||||
{
|
||||
properties.add (new CornerSizeProperty (this));
|
||||
props.add (new CornerSizeProperty (this));
|
||||
|
||||
ColouredElement::getEditableProperties (properties);
|
||||
ColouredElement::getEditableProperties (props);
|
||||
|
||||
properties.add (new ShapeToPathProperty (this));
|
||||
props.add (new ShapeToPathProperty (this));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
class PaintElementText : public ColouredElement
|
||||
{
|
||||
public:
|
||||
PaintElementText (PaintRoutine* owner)
|
||||
: ColouredElement (owner, "Text", false, false),
|
||||
PaintElementText (PaintRoutine* pr)
|
||||
: ColouredElement (pr, "Text", false, false),
|
||||
text ("Your text goes here"),
|
||||
font (15.0f),
|
||||
typefaceName (FontPropertyComponent::getDefaultFont()),
|
||||
|
|
@ -65,16 +65,16 @@ public:
|
|||
return s;
|
||||
}
|
||||
|
||||
void getEditableProperties (Array <PropertyComponent*>& properties)
|
||||
void getEditableProperties (Array<PropertyComponent*>& props)
|
||||
{
|
||||
ColouredElement::getEditableProperties (properties);
|
||||
ColouredElement::getEditableProperties (props);
|
||||
|
||||
properties.add (new TextProperty (this));
|
||||
properties.add (new FontNameProperty (this));
|
||||
properties.add (new FontStyleProperty (this));
|
||||
properties.add (new FontSizeProperty (this));
|
||||
properties.add (new TextJustificationProperty (this));
|
||||
properties.add (new TextToPathProperty (this));
|
||||
props.add (new TextProperty (this));
|
||||
props.add (new FontNameProperty (this));
|
||||
props.add (new FontStyleProperty (this));
|
||||
props.add (new FontSizeProperty (this));
|
||||
props.add (new TextJustificationProperty (this));
|
||||
props.add (new TextToPathProperty (this));
|
||||
}
|
||||
|
||||
void fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ class ComponentBooleanProperty : public BooleanPropertyComponent,
|
|||
{
|
||||
public:
|
||||
ComponentBooleanProperty (const String& name,
|
||||
const String& onText,
|
||||
const String& offText,
|
||||
const String& onText_,
|
||||
const String& offText_,
|
||||
ComponentType* comp,
|
||||
JucerDocument& doc)
|
||||
: BooleanPropertyComponent (name, onText, offText),
|
||||
: BooleanPropertyComponent (name, onText_, offText_),
|
||||
component (comp),
|
||||
document (doc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,11 +120,11 @@ private:
|
|||
{
|
||||
public:
|
||||
ColourChangeAction (Component* const comp,
|
||||
ComponentLayout& layout,
|
||||
ComponentLayout& l,
|
||||
const int colourId_,
|
||||
Colour newColour_,
|
||||
const bool newColourIsDefault)
|
||||
: ComponentUndoableAction<Component> (comp, layout),
|
||||
: ComponentUndoableAction<Component> (comp, l),
|
||||
colourId (colourId_),
|
||||
newColour (newColour_),
|
||||
isDefault (newColourIsDefault)
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ public:
|
|||
Justification::bottomLeft,
|
||||
Justification::bottomRight };
|
||||
|
||||
const int flags = getJustification().getFlags();
|
||||
const int rawFlags = getJustification().getFlags();
|
||||
|
||||
for (int i = numElementsInArray (types); --i >= 0;)
|
||||
if (types[i] == flags)
|
||||
if (types[i] == rawFlags)
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void ComponentOverlayComponent::resizeEnd()
|
|||
layout.getDocument()->beginTransaction();
|
||||
}
|
||||
|
||||
void ComponentOverlayComponent::checkBounds (Rectangle<int>& bounds,
|
||||
void ComponentOverlayComponent::checkBounds (Rectangle<int>& b,
|
||||
const Rectangle<int>& previousBounds,
|
||||
const Rectangle<int>& limits,
|
||||
const bool isStretchingTop,
|
||||
|
|
@ -185,7 +185,7 @@ void ComponentOverlayComponent::checkBounds (Rectangle<int>& bounds,
|
|||
else
|
||||
setFixedAspectRatio (0.0);
|
||||
|
||||
ComponentBoundsConstrainer::checkBounds (bounds, previousBounds, limits, isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight);
|
||||
ComponentBoundsConstrainer::checkBounds (b, previousBounds, limits, isStretchingTop, isStretchingLeft, isStretchingBottom, isStretchingRight);
|
||||
|
||||
if (layout.getDocument()->isSnapActive (true))
|
||||
{
|
||||
|
|
@ -194,10 +194,10 @@ void ComponentOverlayComponent::checkBounds (Rectangle<int>& bounds,
|
|||
const int dx = parent->getX();
|
||||
const int dy = parent->getY();
|
||||
|
||||
int x = bounds.getX();
|
||||
int y = bounds.getY();
|
||||
int w = bounds.getWidth();
|
||||
int h = bounds.getHeight();
|
||||
int x = b.getX();
|
||||
int y = b.getY();
|
||||
int w = b.getWidth();
|
||||
int h = b.getHeight();
|
||||
|
||||
x += borderThickness - dx;
|
||||
y += borderThickness - dy;
|
||||
|
|
@ -224,24 +224,24 @@ void ComponentOverlayComponent::checkBounds (Rectangle<int>& bounds,
|
|||
x -= borderThickness - dx;
|
||||
y -= borderThickness - dy;
|
||||
|
||||
bounds = Rectangle<int> (x, y, w, h);
|
||||
b = Rectangle<int> (x, y, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ComponentOverlayComponent::applyBoundsToComponent (Component* component, const Rectangle<int>& bounds)
|
||||
void ComponentOverlayComponent::applyBoundsToComponent (Component* component, const Rectangle<int>& b)
|
||||
{
|
||||
if (component->getBounds() != bounds)
|
||||
if (component->getBounds() != b)
|
||||
{
|
||||
layout.getDocument()->getUndoManager().undoCurrentTransactionOnly();
|
||||
|
||||
component->setBounds (bounds);
|
||||
component->setBounds (b);
|
||||
|
||||
if (Component* const parent = target->getParentComponent())
|
||||
target->setBounds (bounds.getX() + borderThickness - parent->getX(),
|
||||
bounds.getY() + borderThickness - parent->getY(),
|
||||
bounds.getWidth() - borderThickness * 2,
|
||||
bounds.getHeight() - borderThickness * 2);
|
||||
target->setBounds (b.getX() + borderThickness - parent->getX(),
|
||||
b.getY() + borderThickness - parent->getY(),
|
||||
b.getWidth() - borderThickness * 2,
|
||||
b.getHeight() - borderThickness * 2);
|
||||
|
||||
layout.updateStoredComponentPosition (target, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,9 +325,9 @@ private:
|
|||
addCompileUnits (xml);
|
||||
}
|
||||
|
||||
void setAddOption (XmlElement& xml, const String& name, const String& value) const
|
||||
void setAddOption (XmlElement& xml, const String& nm, const String& value) const
|
||||
{
|
||||
xml.createNewChildElement ("Add")->setAttribute (name, value);
|
||||
xml.createNewChildElement ("Add")->setAttribute (nm, value);
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (CodeBlocksProjectExporter)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace FileHelpers
|
|||
|
||||
bool overwriteFileWithNewDataIfDifferent (const File& file, const void* data, size_t numBytes)
|
||||
{
|
||||
if (file.getSize() == numBytes
|
||||
if (file.getSize() == (int64) numBytes
|
||||
&& calculateMemoryHashCode (data, numBytes) == calculateFileHashCode (file))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public:
|
|||
/** Returns a pointer to the raw midi data.
|
||||
@see getRawDataSize
|
||||
*/
|
||||
const uint8* getRawData() const noexcept { return allocatedData != nullptr ? allocatedData : preallocatedData.asBytes; }
|
||||
const uint8* getRawData() const noexcept { return allocatedData != nullptr ? allocatedData.getData() : preallocatedData.asBytes; }
|
||||
|
||||
/** Returns the number of bytes of data in the message.
|
||||
@see getRawData
|
||||
|
|
@ -925,7 +925,7 @@ private:
|
|||
} preallocatedData;
|
||||
#endif
|
||||
|
||||
inline uint8* getData() noexcept { return allocatedData != nullptr ? allocatedData : preallocatedData.asBytes; }
|
||||
inline uint8* getData() noexcept { return allocatedData != nullptr ? allocatedData.getData() : preallocatedData.asBytes; }
|
||||
};
|
||||
|
||||
#endif // JUCE_MIDIMESSAGE_H_INCLUDED
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_le
|
|||
FLAC__ASSERT(lag <= data_len);
|
||||
|
||||
for(coeff = 0; coeff < lag; coeff++)
|
||||
autoc[coeff] = 0.0;
|
||||
autoc[coeff] = 0.0f;
|
||||
for(sample = 0; sample <= limit; sample++) {
|
||||
d = data[sample];
|
||||
for(coeff = 0; coeff < lag; coeff++)
|
||||
|
|
|
|||
|
|
@ -786,10 +786,10 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_enc(
|
|||
#endif
|
||||
/* keep track of any SEEKTABLE block */
|
||||
if(0 != encoder->protected_->metadata && encoder->protected_->num_metadata_blocks > 0) {
|
||||
unsigned i;
|
||||
for(i = 0; i < encoder->protected_->num_metadata_blocks; i++) {
|
||||
if(0 != encoder->protected_->metadata[i] && encoder->protected_->metadata[i]->type == FLAC__METADATA_TYPE_SEEKTABLE) {
|
||||
encoder->private_->seek_table = &encoder->protected_->metadata[i]->data.seek_table;
|
||||
unsigned j;
|
||||
for(j = 0; j < encoder->protected_->num_metadata_blocks; j++) {
|
||||
if(0 != encoder->protected_->metadata[j] && encoder->protected_->metadata[j]->type == FLAC__METADATA_TYPE_SEEKTABLE) {
|
||||
encoder->private_->seek_table = &encoder->protected_->metadata[j]->data.seek_table;
|
||||
break; /* take only the first one */
|
||||
}
|
||||
}
|
||||
|
|
@ -1485,7 +1485,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncod
|
|||
#else
|
||||
encoder->protected_->num_apodizations = 1;
|
||||
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5f;
|
||||
#endif
|
||||
#endif
|
||||
ok &= FLAC__stream_encoder_set_max_lpc_order (encoder, compression_levels_[value].max_lpc_order);
|
||||
|
|
@ -1598,7 +1598,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *en
|
|||
if(encoder->protected_->num_apodizations == 0) {
|
||||
encoder->protected_->num_apodizations = 1;
|
||||
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5f;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
|
|
@ -2139,7 +2139,7 @@ void set_defaults_enc(FLAC__StreamEncoder *encoder)
|
|||
#ifndef FLAC__INTEGER_ONLY_LIBRARY
|
||||
encoder->protected_->num_apodizations = 1;
|
||||
encoder->protected_->apodizations[0].type = FLAC__APODIZATION_TUKEY;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5;
|
||||
encoder->protected_->apodizations[0].parameters.tukey.p = 0.5f;
|
||||
#endif
|
||||
encoder->protected_->max_lpc_order = 0;
|
||||
encoder->protected_->qlp_coeff_precision = 0;
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
|
|||
bm->short_per_long=ci->blocksizes[1]/ci->blocksizes[0];
|
||||
bm->managed=1;
|
||||
|
||||
bm->avg_bitsper= rint(1.*bi->avg_rate*halfsamples/ratesamples);
|
||||
bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples);
|
||||
bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples);
|
||||
bm->avg_bitsper= (int) rint(1.*bi->avg_rate*halfsamples/ratesamples);
|
||||
bm->min_bitsper= (int) rint(1.*bi->min_rate*halfsamples/ratesamples);
|
||||
bm->max_bitsper= (int) rint(1.*bi->max_rate*halfsamples/ratesamples);
|
||||
|
||||
bm->avgfloat=PACKETBLOBS/2;
|
||||
|
||||
/* not a necessary fix, but one that leads to a more balanced
|
||||
typical initialization */
|
||||
{
|
||||
long desired_fill=bi->reservoir_bits*bi->reservoir_bias;
|
||||
long desired_fill = (long) (bi->reservoir_bits*bi->reservoir_bias);
|
||||
bm->minmax_reservoir=desired_fill;
|
||||
bm->avg_reservoir=desired_fill;
|
||||
}
|
||||
|
|
@ -80,12 +80,12 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
|
|||
codec_setup_info *ci=(codec_setup_info*)vi->codec_setup;
|
||||
bitrate_manager_info *bi=&ci->bi;
|
||||
|
||||
int choice=rint(bm->avgfloat);
|
||||
int choice = (int) rint(bm->avgfloat);
|
||||
long this_bits=oggpack_bytes(vbi->packetblob[choice])*8;
|
||||
long min_target_bits=(vb->W?bm->min_bitsper*bm->short_per_long:bm->min_bitsper);
|
||||
long max_target_bits=(vb->W?bm->max_bitsper*bm->short_per_long:bm->max_bitsper);
|
||||
int samples=ci->blocksizes[vb->W]>>1;
|
||||
long desired_fill=bi->reservoir_bits*bi->reservoir_bias;
|
||||
long desired_fill = (long) (bi->reservoir_bits*bi->reservoir_bias);
|
||||
if(!bm->managed){
|
||||
/* not a bitrate managed stream, but for API simplicity, we'll
|
||||
buffer the packet to keep the code path clean */
|
||||
|
|
@ -132,7 +132,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
|
|||
slew=rint(choice-bm->avgfloat)/samples*vi->rate;
|
||||
if(slew<-slewlimit)slew=-slewlimit;
|
||||
if(slew>slewlimit)slew=slewlimit;
|
||||
choice=rint(bm->avgfloat+= slew/vi->rate*samples);
|
||||
choice = (int) rint(bm->avgfloat+= slew/vi->rate*samples);
|
||||
this_bits=oggpack_bytes(vbi->packetblob[choice])*8;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ int vorbis_block_clear(vorbis_block *vb){
|
|||
The init is here because some of it is shared */
|
||||
|
||||
static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){
|
||||
int i;
|
||||
codec_setup_info *ci=(codec_setup_info*)vi->codec_setup;
|
||||
private_state *b=NULL;
|
||||
int hs;
|
||||
|
|
@ -206,12 +205,12 @@ static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){
|
|||
/* finish the codebooks */
|
||||
if(!ci->fullbooks){
|
||||
ci->fullbooks=(codebook*) _ogg_calloc(ci->books,sizeof(*ci->fullbooks));
|
||||
for(i=0;i<ci->books;i++)
|
||||
for(int i=0;i<ci->books;i++)
|
||||
vorbis_book_init_encode(ci->fullbooks+i,ci->book_param[i]);
|
||||
}
|
||||
|
||||
b->psy=(vorbis_look_psy*)_ogg_calloc(ci->psys,sizeof(*b->psy));
|
||||
for(i=0;i<ci->psys;i++){
|
||||
for(int i=0;i<ci->psys;i++){
|
||||
_vp_psy_init(b->psy+i,
|
||||
ci->psy_param[i],
|
||||
&ci->psy_g_param,
|
||||
|
|
@ -224,7 +223,7 @@ static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){
|
|||
/* finish the codebooks */
|
||||
if(!ci->fullbooks){
|
||||
ci->fullbooks=(codebook*) _ogg_calloc(ci->books,sizeof(*ci->fullbooks));
|
||||
for(i=0;i<ci->books;i++){
|
||||
for(int i=0;i<ci->books;i++){
|
||||
if(ci->book_param[i]==NULL)
|
||||
goto abort_books;
|
||||
if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]))
|
||||
|
|
@ -261,17 +260,17 @@ static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){
|
|||
b->flr=(vorbis_look_floor**)_ogg_calloc(ci->floors,sizeof(*b->flr));
|
||||
b->residue=(vorbis_look_residue**)_ogg_calloc(ci->residues,sizeof(*b->residue));
|
||||
|
||||
for(i=0;i<ci->floors;i++)
|
||||
for(int i=0;i<ci->floors;i++)
|
||||
b->flr[i]=_floor_P[ci->floor_type[i]]->
|
||||
look(v,ci->floor_param[i]);
|
||||
|
||||
for(i=0;i<ci->residues;i++)
|
||||
for(int i=0;i<ci->residues;i++)
|
||||
b->residue[i]=_residue_P[ci->residue_type[i]]->
|
||||
look(v,ci->residue_param[i]);
|
||||
|
||||
return 0;
|
||||
abort_books:
|
||||
for(i=0;i<ci->books;i++){
|
||||
for(int i=0;i<ci->books;i++){
|
||||
if(ci->book_param[i]!=NULL){
|
||||
vorbis_staticbook_destroy(ci->book_param[i]);
|
||||
ci->book_param[i]=NULL;
|
||||
|
|
@ -850,7 +849,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
|
|||
if(b->sample_count>v->granulepos){
|
||||
/* corner case; if this is both the first and last audio page,
|
||||
then spec says the end is cut, not beginning */
|
||||
long extra=b->sample_count-vb->granulepos;
|
||||
long extra = (long) (b->sample_count-vb->granulepos);
|
||||
|
||||
/* we use ogg_int64_t for granule positions because a
|
||||
uint64 isn't universally available. Unfortunately,
|
||||
|
|
@ -958,7 +957,6 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){
|
|||
int n=ci->blocksizes[v->W]>>(hs+1);
|
||||
int n0=ci->blocksizes[0]>>(hs+1);
|
||||
int n1=ci->blocksizes[1]>>(hs+1);
|
||||
int i,j;
|
||||
|
||||
if(v->pcm_returned<0)return 0;
|
||||
|
||||
|
|
@ -975,9 +973,9 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){
|
|||
if(v->centerW==n1){
|
||||
/* the data buffer wraps; swap the halves */
|
||||
/* slow, sure, small */
|
||||
for(j=0;j<vi->channels;j++){
|
||||
for(int j=0;j<vi->channels;j++){
|
||||
float *p=v->pcm[j];
|
||||
for(i=0;i<n1;i++){
|
||||
for(int i=0;i<n1;i++){
|
||||
float temp=p[i];
|
||||
p[i]=p[i+n1];
|
||||
p[i+n1]=temp;
|
||||
|
|
@ -992,10 +990,10 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){
|
|||
/* solidify buffer into contiguous space */
|
||||
if((v->lW^v->W)==1){
|
||||
/* long/short or short/long */
|
||||
for(j=0;j<vi->channels;j++){
|
||||
for(int j=0;j<vi->channels;j++){
|
||||
float *s=v->pcm[j];
|
||||
float *d=v->pcm[j]+(n1-n0)/2;
|
||||
for(i=(n1+n0)/2-1;i>=0;--i)
|
||||
for(int i=(n1+n0)/2-1;i>=0;--i)
|
||||
d[i]=s[i];
|
||||
}
|
||||
v->pcm_returned+=(n1-n0)/2;
|
||||
|
|
@ -1003,10 +1001,10 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){
|
|||
}else{
|
||||
if(v->lW==0){
|
||||
/* short/short */
|
||||
for(j=0;j<vi->channels;j++){
|
||||
for(int j=0;j<vi->channels;j++){
|
||||
float *s=v->pcm[j];
|
||||
float *d=v->pcm[j]+n1-n0;
|
||||
for(i=n0-1;i>=0;--i)
|
||||
for(int i=n0-1;i>=0;--i)
|
||||
d[i]=s[i];
|
||||
}
|
||||
v->pcm_returned+=n1-n0;
|
||||
|
|
@ -1015,8 +1013,7 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){
|
|||
}
|
||||
|
||||
if(pcm){
|
||||
int i;
|
||||
for(i=0;i<vi->channels;i++)
|
||||
for(int i=0;i<vi->channels;i++)
|
||||
v->pcmret[i]=v->pcm[i]+v->pcm_returned;
|
||||
*pcm=v->pcmret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ static long **_01class(vorbis_block *vb,vorbis_look_residue *vl,
|
|||
|
||||
int partvals=n/samples_per_partition;
|
||||
long **partword=(long**)_vorbis_block_alloc(vb,ch*sizeof(*partword));
|
||||
float scale=100./samples_per_partition;
|
||||
float scale=100.0f/samples_per_partition;
|
||||
|
||||
/* we find the partition type for each partition of each
|
||||
channel. We'll go back and do the interleaved encoding in a
|
||||
|
|
|
|||
|
|
@ -138,11 +138,9 @@ void b2CollidePolygonAndCircle(
|
|||
else
|
||||
{
|
||||
b2Vec2 faceCenter = 0.5f * (v1 + v2);
|
||||
float32 separation = b2Dot(cLocal - faceCenter, normals[vertIndex1]);
|
||||
if (separation > radius)
|
||||
{
|
||||
|
||||
if (b2Dot (cLocal - faceCenter, normals[vertIndex1]) > radius)
|
||||
return;
|
||||
}
|
||||
|
||||
manifold->pointCount = 1;
|
||||
manifold->type = b2Manifold::e_faceA;
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ struct b2Simplex
|
|||
{
|
||||
case 0:
|
||||
b2Assert(false);
|
||||
return 0.0;
|
||||
return 0.0f;
|
||||
|
||||
case 1:
|
||||
return 0.0f;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
struct b2Color
|
||||
{
|
||||
b2Color() {}
|
||||
b2Color(float32 r, float32 g, float32 b) : r(r), g(g), b(b) {}
|
||||
b2Color(float32 red, float32 green, float32 blue) : r(red), g(green), b(blue) {}
|
||||
void Set(float32 ri, float32 gi, float32 bi) { r = ri; g = gi; b = bi; }
|
||||
float32 r, g, b;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ struct b2Vec2
|
|||
b2Vec2() {}
|
||||
|
||||
/// Construct using coordinates.
|
||||
b2Vec2(float32 x, float32 y) : x(x), y(y) {}
|
||||
b2Vec2(float32 xCoord, float32 yCoord) : x(xCoord), y(yCoord) {}
|
||||
|
||||
/// Set this vector to all zeros.
|
||||
void SetZero() { x = 0.0f; y = 0.0f; }
|
||||
|
|
@ -158,7 +158,7 @@ struct b2Vec3
|
|||
b2Vec3() {}
|
||||
|
||||
/// Construct using coordinates.
|
||||
b2Vec3(float32 x, float32 y, float32 z) : x(x), y(y), z(z) {}
|
||||
b2Vec3(float32 xCoord, float32 yCoord, float32 zCoord) : x(xCoord), y(yCoord), z(zCoord) {}
|
||||
|
||||
/// Set this vector to all zeros.
|
||||
void SetZero() { x = 0.0f; y = 0.0f; z = 0.0f; }
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ b2PrismaticJoint::b2PrismaticJoint(const b2PrismaticJointDef* def)
|
|||
m_referenceAngle = def->referenceAngle;
|
||||
|
||||
m_impulse.SetZero();
|
||||
m_motorMass = 0.0;
|
||||
m_motorMass = 0.0f;
|
||||
m_motorImpulse = 0.0f;
|
||||
|
||||
m_lowerTranslation = def->lowerTranslation;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ b2WheelJoint::b2WheelJoint(const b2WheelJointDef* def)
|
|||
|
||||
m_mass = 0.0f;
|
||||
m_impulse = 0.0f;
|
||||
m_motorMass = 0.0;
|
||||
m_motorMass = 0.0f;
|
||||
m_motorImpulse = 0.0f;
|
||||
m_springMass = 0.0f;
|
||||
m_springImpulse = 0.0f;
|
||||
|
|
@ -141,14 +141,14 @@ void b2WheelJoint::InitVelocityConstraints(const b2SolverData& data)
|
|||
float32 omega = 2.0f * b2_pi * m_frequencyHz;
|
||||
|
||||
// Damping coefficient
|
||||
float32 d = 2.0f * m_springMass * m_dampingRatio * omega;
|
||||
float32 damp = 2.0f * m_springMass * m_dampingRatio * omega;
|
||||
|
||||
// Spring stiffness
|
||||
float32 k = m_springMass * omega * omega;
|
||||
|
||||
// magic formulas
|
||||
float32 h = data.step.dt;
|
||||
m_gamma = h * (d + h * k);
|
||||
m_gamma = h * (damp + h * k);
|
||||
if (m_gamma > 0.0f)
|
||||
{
|
||||
m_gamma = 1.0f / m_gamma;
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ void b2Island::Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& g
|
|||
// Solve position constraints
|
||||
timer.Reset();
|
||||
bool positionSolved = false;
|
||||
for (int32 i = 0; i < step.positionIterations; ++i)
|
||||
for (int32 j = 0; j < step.positionIterations; ++j)
|
||||
{
|
||||
bool contactsOkay = contactSolver.SolvePositionConstraints();
|
||||
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ public:
|
|||
/** Returns true if this data contains a valid string in this encoding. */
|
||||
static bool isValidString (const CharType* dataToTest, int maxBytesToRead)
|
||||
{
|
||||
maxBytesToRead /= sizeof (CharType);
|
||||
maxBytesToRead /= (int) sizeof (CharType);
|
||||
|
||||
while (--maxBytesToRead >= 0 && *dataToTest != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ public:
|
|||
/** Returns true if this data contains a valid string in this encoding. */
|
||||
static bool isValidString (const CharType* dataToTest, int maxBytesToRead)
|
||||
{
|
||||
maxBytesToRead /= sizeof (CharType);
|
||||
maxBytesToRead /= (int) sizeof (CharType);
|
||||
|
||||
while (--maxBytesToRead >= 0 && *dataToTest != 0)
|
||||
if (! canRepresent (*dataToTest++))
|
||||
|
|
|
|||
|
|
@ -251,8 +251,8 @@ unsigned long ZEXPORT crc32 (unsigned long crc, const unsigned char FAR *buf, un
|
|||
|
||||
/* ========================================================================= */
|
||||
#define DOLIT4 c ^= *buf4++; \
|
||||
c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
|
||||
crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
|
||||
c = (u4) (crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
|
||||
crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24])
|
||||
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
|
||||
|
||||
/* ========================================================================= */
|
||||
|
|
@ -264,7 +264,7 @@ local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf
|
|||
c = (u4)crc;
|
||||
c = ~c;
|
||||
while (len && ((ptrdiff_t)buf & 3)) {
|
||||
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
|
||||
c = (u4) (crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8));
|
||||
len--;
|
||||
}
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf
|
|||
buf = (const unsigned char FAR *)buf4;
|
||||
|
||||
if (len) do {
|
||||
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
|
||||
c = (u4) (crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8));
|
||||
} while (--len);
|
||||
c = ~c;
|
||||
return (unsigned long)c;
|
||||
|
|
@ -288,8 +288,8 @@ local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf
|
|||
|
||||
/* ========================================================================= */
|
||||
#define DOBIG4 c ^= *++buf4; \
|
||||
c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
|
||||
crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
|
||||
c = (u4) (crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
|
||||
crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24])
|
||||
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
|
||||
|
||||
/* ========================================================================= */
|
||||
|
|
@ -301,7 +301,7 @@ local unsigned long crc32_big (unsigned long crc, const unsigned char FAR *buf,
|
|||
c = REV((u4)crc);
|
||||
c = ~c;
|
||||
while (len && ((ptrdiff_t)buf & 3)) {
|
||||
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
|
||||
c = (u4) (crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8));
|
||||
len--;
|
||||
}
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ local unsigned long crc32_big (unsigned long crc, const unsigned char FAR *buf,
|
|||
buf = (const unsigned char FAR *)buf4;
|
||||
|
||||
if (len) do {
|
||||
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
|
||||
c = (u4) (crc_table[4][(c >> 24) ^ (u4) *buf++] ^ (c << 8));
|
||||
} while (--len);
|
||||
c = ~c;
|
||||
return (unsigned long)(REV(c));
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ int ZEXPORT inflatePrime (z_streamp strm, int bits, int value)
|
|||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
|
||||
value &= (1L << bits) - 1;
|
||||
value &= (1 << bits) - 1;
|
||||
state->hold += value << state->bits;
|
||||
state->bits += bits;
|
||||
return Z_OK;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ local void send_bits (deflate_state *s, int value, int length)
|
|||
s->bi_buf |= (value << s->bi_valid);
|
||||
put_short(s, s->bi_buf);
|
||||
s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
|
||||
s->bi_valid += length - Buf_size;
|
||||
s->bi_valid += (int) (length - Buf_size);
|
||||
} else {
|
||||
s->bi_buf |= value << s->bi_valid;
|
||||
s->bi_valid += length;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ private:
|
|||
//==============================================================================
|
||||
AsyncUpdater::AsyncUpdater()
|
||||
{
|
||||
message = new AsyncUpdaterMessage (*this);
|
||||
activeMessage = new AsyncUpdaterMessage (*this);
|
||||
}
|
||||
|
||||
AsyncUpdater::~AsyncUpdater()
|
||||
|
|
@ -55,18 +55,18 @@ AsyncUpdater::~AsyncUpdater()
|
|||
// deleting this object, or find some other way to avoid such a race condition.
|
||||
jassert ((! isUpdatePending()) || MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
|
||||
message->shouldDeliver.set (0);
|
||||
activeMessage->shouldDeliver.set (0);
|
||||
}
|
||||
|
||||
void AsyncUpdater::triggerAsyncUpdate()
|
||||
{
|
||||
if (message->shouldDeliver.compareAndSetBool (1, 0))
|
||||
message->post();
|
||||
if (activeMessage->shouldDeliver.compareAndSetBool (1, 0))
|
||||
activeMessage->post();
|
||||
}
|
||||
|
||||
void AsyncUpdater::cancelPendingUpdate() noexcept
|
||||
{
|
||||
message->shouldDeliver.set (0);
|
||||
activeMessage->shouldDeliver.set (0);
|
||||
}
|
||||
|
||||
void AsyncUpdater::handleUpdateNowIfNeeded()
|
||||
|
|
@ -74,11 +74,11 @@ void AsyncUpdater::handleUpdateNowIfNeeded()
|
|||
// This can only be called by the event thread.
|
||||
jassert (MessageManager::getInstance()->currentThreadHasLockedMessageManager());
|
||||
|
||||
if (message->shouldDeliver.exchange (0) != 0)
|
||||
if (activeMessage->shouldDeliver.exchange (0) != 0)
|
||||
handleAsyncUpdate();
|
||||
}
|
||||
|
||||
bool AsyncUpdater::isUpdatePending() const noexcept
|
||||
{
|
||||
return message->shouldDeliver.value != 0;
|
||||
return activeMessage->shouldDeliver.value != 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ private:
|
|||
//==============================================================================
|
||||
class AsyncUpdaterMessage;
|
||||
friend class ReferenceCountedObjectPtr<AsyncUpdaterMessage>;
|
||||
ReferenceCountedObjectPtr<AsyncUpdaterMessage> message;
|
||||
ReferenceCountedObjectPtr<AsyncUpdaterMessage> activeMessage;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AsyncUpdater)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -163,9 +163,9 @@ void CoreGraphicsContext::setOrigin (Point<int> o)
|
|||
|
||||
void CoreGraphicsContext::addTransform (const AffineTransform& transform)
|
||||
{
|
||||
applyTransform (AffineTransform::verticalFlip (flipHeight)
|
||||
applyTransform (AffineTransform::verticalFlip ((float) flipHeight)
|
||||
.followedBy (transform)
|
||||
.translated (0, -flipHeight)
|
||||
.translated (0, (float) -flipHeight)
|
||||
.scaled (1.0f, -1.0f));
|
||||
lastClipRectIsValid = false;
|
||||
|
||||
|
|
@ -620,7 +620,7 @@ void CoreGraphicsContext::drawGlyph (int glyphNumber, const AffineTransform& tra
|
|||
bool CoreGraphicsContext::drawTextLayout (const AttributedString& text, const Rectangle<float>& area)
|
||||
{
|
||||
#if JUCE_CORETEXT_AVAILABLE
|
||||
CoreTextTypeLayout::drawToCGContext (text, area, context, flipHeight);
|
||||
CoreTextTypeLayout::drawToCGContext (text, area, context, (float) flipHeight);
|
||||
return true;
|
||||
#else
|
||||
(void) text; (void) area;
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ namespace CoreTextTypeLayout
|
|||
|
||||
TextLayout::Line* const glyphLine = new TextLayout::Line (lineStringRange,
|
||||
Point<float> ((float) lineInfo.origin.x,
|
||||
boundsHeight - (float) lineInfo.origin.y),
|
||||
(float) (boundsHeight - lineInfo.origin.y)),
|
||||
(float) lineInfo.ascent,
|
||||
(float) lineInfo.descent,
|
||||
(float) lineInfo.leading,
|
||||
|
|
@ -443,7 +443,7 @@ namespace CoreTextTypeLayout
|
|||
|
||||
glyphRun->font = Font (String::fromCFString (cfsFontFamily),
|
||||
String::fromCFString (cfsFontStyle),
|
||||
CTFontGetSize (ctRunFont) / fontHeightToPointsFactor);
|
||||
(float) (CTFontGetSize (ctRunFont) / fontHeightToPointsFactor));
|
||||
|
||||
CFRelease (cfsFontStyle);
|
||||
CFRelease (cfsFontFamily);
|
||||
|
|
@ -455,7 +455,10 @@ namespace CoreTextTypeLayout
|
|||
{
|
||||
const CGFloat* const components = CGColorGetComponents (cgRunColor);
|
||||
|
||||
glyphRun->colour = Colour::fromFloatRGBA (components[0], components[1], components[2], components[3]);
|
||||
glyphRun->colour = Colour::fromFloatRGBA ((float) components[0],
|
||||
(float) components[1],
|
||||
(float) components[2],
|
||||
(float) components[3]);
|
||||
}
|
||||
|
||||
const Glyphs glyphs (run, (size_t) numGlyphs);
|
||||
|
|
@ -463,9 +466,9 @@ namespace CoreTextTypeLayout
|
|||
const Positions positions (run, (size_t) numGlyphs);
|
||||
|
||||
for (CFIndex k = 0; k < numGlyphs; ++k)
|
||||
glyphRun->glyphs.add (TextLayout::Glyph (glyphs.glyphs[k], Point<float> (positions.points[k].x,
|
||||
positions.points[k].y),
|
||||
advances.advances[k].width));
|
||||
glyphRun->glyphs.add (TextLayout::Glyph (glyphs.glyphs[k], Point<float> ((float) positions.points[k].x,
|
||||
(float) positions.points[k].y),
|
||||
(float) advances.advances[k].width));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
// and your header search path must make it accessible to the module's files.
|
||||
#include "AppConfig.h"
|
||||
|
||||
#define NS_FORMAT_FUNCTION(F,A) // To avoid spurious warnings from GCC
|
||||
|
||||
#include "../juce_core/native/juce_BasicNativeHeaders.h"
|
||||
#include "juce_gui_basics.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1041,9 +1041,7 @@ private:
|
|||
else if (wasDown && timeNow > window.windowCreationTime + 250
|
||||
&& ! (isDown || overScrollArea))
|
||||
{
|
||||
bool isOver = window.reallyContains (localMousePos, true);
|
||||
|
||||
if (isOver)
|
||||
if (window.reallyContains (localMousePos, true))
|
||||
window.triggerCurrentlyHighlightedItem();
|
||||
else if ((window.hasBeenOver || ! window.dismissOnMouseUp) && ! isOverAny)
|
||||
window.dismissMenu (nullptr);
|
||||
|
|
@ -1060,23 +1058,23 @@ private:
|
|||
{
|
||||
if (globalMousePos != lastMousePos || timeNow > lastMouseMoveTime + 350)
|
||||
{
|
||||
const bool isOver = window.reallyContains (localMousePos, true);
|
||||
const bool isMouseOver = window.reallyContains (localMousePos, true);
|
||||
|
||||
if (isOver)
|
||||
if (isMouseOver)
|
||||
window.hasBeenOver = true;
|
||||
|
||||
if (lastMousePos.getDistanceFrom (globalMousePos) > 2)
|
||||
{
|
||||
lastMouseMoveTime = timeNow;
|
||||
|
||||
if (window.disableMouseMoves && isOver)
|
||||
if (window.disableMouseMoves && isMouseOver)
|
||||
window.disableMouseMoves = false;
|
||||
}
|
||||
|
||||
if (window.disableMouseMoves || (window.activeSubMenu != nullptr && window.activeSubMenu->isOverChildren()))
|
||||
return;
|
||||
|
||||
const bool isMovingTowardsMenu = isOver && globalMousePos != lastMousePos
|
||||
const bool isMovingTowardsMenu = isMouseOver && globalMousePos != lastMousePos
|
||||
&& isMovingTowardsSubmenu (globalMousePos);
|
||||
|
||||
lastMousePos = globalMousePos;
|
||||
|
|
@ -1093,12 +1091,12 @@ private:
|
|||
itemUnderMouse = c->findParentComponentOfClass<ItemComponent>();
|
||||
|
||||
if (itemUnderMouse != window.currentChild
|
||||
&& (isOver || (window.activeSubMenu == nullptr) || ! window.activeSubMenu->isVisible()))
|
||||
&& (isMouseOver || (window.activeSubMenu == nullptr) || ! window.activeSubMenu->isVisible()))
|
||||
{
|
||||
if (isOver && (c != nullptr) && (window.activeSubMenu != nullptr))
|
||||
if (isMouseOver && (c != nullptr) && (window.activeSubMenu != nullptr))
|
||||
window.activeSubMenu->hide (nullptr, true);
|
||||
|
||||
if (! isOver)
|
||||
if (! isMouseOver)
|
||||
itemUnderMouse = nullptr;
|
||||
|
||||
window.setCurrentlyHighlightedChild (itemUnderMouse);
|
||||
|
|
|
|||
|
|
@ -598,8 +598,8 @@ public:
|
|||
if ([ev hasPreciseScrollingDeltas])
|
||||
{
|
||||
const float scale = 0.5f / 256.0f;
|
||||
wheel.deltaX = [ev scrollingDeltaX] * scale;
|
||||
wheel.deltaY = [ev scrollingDeltaY] * scale;
|
||||
wheel.deltaX = scale * (float) [ev scrollingDeltaX];
|
||||
wheel.deltaY = scale * (float) [ev scrollingDeltaY];
|
||||
wheel.isSmooth = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -618,8 +618,8 @@ public:
|
|||
if (wheel.deltaX == 0 && wheel.deltaY == 0)
|
||||
{
|
||||
const float scale = 10.0f / 256.0f;
|
||||
wheel.deltaX = [ev deltaX] * scale;
|
||||
wheel.deltaY = [ev deltaY] * scale;
|
||||
wheel.deltaX = scale * (float) [ev deltaX];
|
||||
wheel.deltaY = scale * (float) [ev deltaY];
|
||||
}
|
||||
|
||||
handleMouseWheel (0, getMousePos (ev, view), getMouseTime (ev), wheel);
|
||||
|
|
@ -628,7 +628,7 @@ public:
|
|||
void redirectMagnify (NSEvent* ev)
|
||||
{
|
||||
#if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
const float invScale = 1.0f - [ev magnification];
|
||||
const float invScale = 1.0f - (float) [ev magnification];
|
||||
|
||||
if (invScale != 0.0f)
|
||||
handleMagnifyGesture (0, getMousePos (ev, view), getMouseTime (ev), 1.0f / invScale);
|
||||
|
|
@ -766,7 +766,7 @@ public:
|
|||
#if defined (MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
|
||||
NSScreen* screen = [[view window] screen];
|
||||
if ([screen respondsToSelector: @selector (backingScaleFactor)])
|
||||
displayScale = screen.backingScaleFactor;
|
||||
displayScale = (float) screen.backingScaleFactor;
|
||||
#endif
|
||||
|
||||
#if USE_COREGRAPHICS_RENDERING
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ void TooltipWindow::updatePosition (const String& tip, Point<int> pos, const Rec
|
|||
int w, h;
|
||||
getLookAndFeel().getTooltipSize (tip, w, h);
|
||||
|
||||
Rectangle<int> bounds (pos.x > parentArea.getCentreX() ? pos.x - (w + 12) : pos.x + 24,
|
||||
pos.y > parentArea.getCentreY() ? pos.y - (h + 6) : pos.y + 6,
|
||||
w, h);
|
||||
setBounds (Rectangle<int> (pos.x > parentArea.getCentreX() ? pos.x - (w + 12) : pos.x + 24,
|
||||
pos.y > parentArea.getCentreY() ? pos.y - (h + 6) : pos.y + 6,
|
||||
w, h)
|
||||
.constrainedWithin (parentArea));
|
||||
|
||||
setBounds (bounds.constrainedWithin (parentArea));
|
||||
setVisible (true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern Image juce_createImageFromCIImage (CIImage* im, int w, int h);
|
|||
class QTCameraDeviceInternal
|
||||
{
|
||||
public:
|
||||
QTCameraDeviceInternal (CameraDevice* owner, const int index)
|
||||
QTCameraDeviceInternal (CameraDevice*, const int index)
|
||||
: input (nil),
|
||||
audioDevice (nil),
|
||||
audioInput (nil),
|
||||
|
|
@ -228,9 +228,8 @@ private:
|
|||
static QTCameraDeviceInternal* getOwner (id self) { return getIvar<QTCameraDeviceInternal*> (self, "owner"); }
|
||||
|
||||
private:
|
||||
static void didOutputVideoFrame (id self, SEL, QTCaptureOutput* captureOutput,
|
||||
CVImageBufferRef videoFrame, QTSampleBuffer* sampleBuffer,
|
||||
QTCaptureConnection* connection)
|
||||
static void didOutputVideoFrame (id self, SEL, QTCaptureOutput*, CVImageBufferRef videoFrame,
|
||||
QTSampleBuffer*, QTCaptureConnection*)
|
||||
{
|
||||
QTCameraDeviceInternal* const internal = getOwner (self);
|
||||
|
||||
|
|
@ -239,8 +238,8 @@ private:
|
|||
JUCE_AUTORELEASEPOOL
|
||||
{
|
||||
internal->callListeners ([CIImage imageWithCVImageBuffer: videoFrame],
|
||||
CVPixelBufferGetWidth (videoFrame),
|
||||
CVPixelBufferGetHeight (videoFrame));
|
||||
(int) CVPixelBufferGetWidth (videoFrame),
|
||||
(int) CVPixelBufferGetHeight (videoFrame));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -256,7 +255,7 @@ private:
|
|||
class QTCaptureViewerComp : public NSViewComponent
|
||||
{
|
||||
public:
|
||||
QTCaptureViewerComp (CameraDevice* const cameraDevice, QTCameraDeviceInternal* const internal)
|
||||
QTCaptureViewerComp (CameraDevice*, QTCameraDeviceInternal* internal)
|
||||
{
|
||||
JUCE_AUTORELEASEPOOL
|
||||
{
|
||||
|
|
@ -391,8 +390,8 @@ StringArray CameraDevice::getAvailableDevices()
|
|||
}
|
||||
|
||||
CameraDevice* CameraDevice::openDevice (int index,
|
||||
int minWidth, int minHeight,
|
||||
int maxWidth, int maxHeight)
|
||||
int /*minWidth*/, int /*minHeight*/,
|
||||
int /*maxWidth*/, int /*maxHeight*/)
|
||||
{
|
||||
ScopedPointer <CameraDevice> d (new CameraDevice (getAvailableDevices() [index], index));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue