Browse Source

Fixed a couple of win32 flags and Jucer include paths.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
abf5805734
7 changed files with 45 additions and 11 deletions
  1. +1
    -1
      extras/Jucer (experimental)/Source/model/Component Types/jucer_TextButton.h
  2. +1
    -1
      extras/Jucer (experimental)/Source/model/Component Types/jucer_ToggleButton.h
  3. +33
    -2
      extras/Jucer (experimental)/Source/model/jucer_ComponentDocument.cpp
  4. +5
    -5
      extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditor.cpp
  5. +3
    -0
      extras/Jucer (experimental)/Source/ui/jucer_MainWindow.cpp
  6. +1
    -1
      extras/Jucer (experimental)/Source/ui/jucer_MainWindow.h
  7. +1
    -1
      extras/browser plugins/wrapper/juce_NPAPI_GlueCode.cpp

+ 1
- 1
extras/Jucer (experimental)/Source/model/Component Types/jucer_TextButton.h View File

@@ -23,7 +23,7 @@
==============================================================================
*/
#include "jucer_ComponentDocument.h"
#include "../jucer_ComponentDocument.h"
//==============================================================================


+ 1
- 1
extras/Jucer (experimental)/Source/model/Component Types/jucer_ToggleButton.h View File

@@ -23,7 +23,7 @@
==============================================================================
*/
#include "jucer_ComponentDocument.h"
#include "../jucer_ComponentDocument.h"
//==============================================================================


+ 33
- 2
extras/Jucer (experimental)/Source/model/jucer_ComponentDocument.cpp View File

@@ -451,10 +451,22 @@ public:
{
for (int i = 0; i < items.size(); ++i)
{
Component* comp = items.getUnchecked(i);
jassert (items.getUnchecked(i) != 0);
const ValueTree v (document.getComponentState (items.getUnchecked(i)));
const ValueTree v (document.getComponentState (comp));
draggedComponents.add (v);
originalPositions.add (stringToComponentBounds (v [compBoundsProperty]));
const Rectangle<int> pos (stringToComponentBounds (v [compBoundsProperty]));
originalPositions.add (pos);
const Rectangle<float> floatPos ((float) pos.getX(), (float) pos.getY(),
(float) pos.getWidth(), (float) pos.getHeight());
verticalSnapPositions.add (floatPos.getX());
verticalSnapPositions.add (floatPos.getCentreX());
verticalSnapPositions.add (floatPos.getRight());
horizontalSnapPositions.add (floatPos.getY());
verticalSnapPositions.add (floatPos.getCentreY());
horizontalSnapPositions.add (floatPos.getBottom());
}
document.beginNewTransaction();
@@ -479,10 +491,29 @@ public:
v.setProperty (compBoundsProperty, componentBoundsToString (newBounds), document.getUndoManager());
}
const Array<float> getVerticalSnapPositions (const Point<int>& distance) const
{
Array<float> p (verticalSnapPositions);
for (int i = p.size(); --i >= 0;)
p.set (i, p.getUnchecked(i) + distance.getX());
return p;
}
const Array<float> getHorizontalSnapPositions (const Point<int>& distance) const
{
Array<float> p (horizontalSnapPositions);
for (int i = p.size(); --i >= 0;)
p.set (i, p.getUnchecked(i) + distance.getY());
return p;
}
private:
ComponentDocument& document;
Array <ValueTree> draggedComponents;
Array <Rectangle<int> > originalPositions;
Array <float> verticalSnapPositions, horizontalSnapPositions;
const ResizableBorderComponent::Zone zone;
};


+ 5
- 5
extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditor.cpp View File

@@ -444,12 +444,12 @@ ComponentEditor::ComponentEditor (OpenDocumentManager::Document* document,
project (project_),
componentDocument (componentDocument_)
{
jassert (componentDocument != 0);
setOpaque (true);
addAndMakeVisible (viewport = new Viewport());
viewport->setViewedComponent (new ComponentCanvas (*this));
if (document != 0)
viewport->setViewedComponent (new ComponentCanvas (*this));
}
ComponentEditor::~ComponentEditor()
@@ -507,11 +507,11 @@ bool ComponentEditor::perform (const InvocationInfo& info)
switch (info.commandID)
{
case CommandIDs::undo:
jassertfalse //xxx
getDocument().getUndoManager()->undo();
return true;
case CommandIDs::redo:
jassertfalse //xxx
getDocument().getUndoManager()->redo();
return true;
default:


+ 3
- 0
extras/Jucer (experimental)/Source/ui/jucer_MainWindow.cpp View File

@@ -66,6 +66,9 @@ MainWindow::MainWindow()
DocumentEditorComponent dec (0);
commandManager->registerAllCommandsForTarget (&dec);
ComponentEditor compEd (0, 0, 0);
commandManager->registerAllCommandsForTarget (&compEd);
}
commandManager->getKeyMappings()->resetToDefaultMappings();


+ 1
- 1
extras/Jucer (experimental)/Source/ui/jucer_MainWindow.h View File

@@ -27,7 +27,7 @@
#define __JUCER_MAINWINDOW_JUCEHEADER__
#include "jucer_ProjectContentComponent.h"
#include "Component Editor/jucer_ComponentEditor.h"
//==============================================================================
/**


+ 1
- 1
extras/browser plugins/wrapper/juce_NPAPI_GlueCode.cpp View File

@@ -400,7 +400,7 @@ public:
setVisible (true);
oldWinProc = SubclassWindow (parentHWND, (WNDPROC) interceptingWinProc);
SetWindowLongPtr (parentHWND, GWL_USERDATA, (LONG_PTR) this);
SetWindowLongPtr (parentHWND, GWLP_USERDATA, (LONG_PTR) this);
resizeToParentWindow (window->width, window->height);
}


Loading…
Cancel
Save