openshot-audio  0.1.5
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
HWNDComponentPeer Class Reference
Inheritance diagram for HWNDComponentPeer:
ComponentPeer

Classes

class  JuceDropTarget
 

Public Types

enum  RenderingEngineType { softwareRenderingEngine = 0, direct2DRenderingEngine }
 
- Public Types inherited from ComponentPeer
enum  StyleFlags {
  windowAppearsOnTaskbar = (1 << 0), windowIsTemporary = (1 << 1), windowIgnoresMouseClicks = (1 << 2), windowHasTitleBar = (1 << 3),
  windowIsResizable = (1 << 4), windowHasMinimiseButton = (1 << 5), windowHasMaximiseButton = (1 << 6), windowHasCloseButton = (1 << 7),
  windowHasDropShadow = (1 << 8), windowRepaintedExplictly = (1 << 9), windowIgnoresKeyPresses = (1 << 10), windowIsSemiTransparent = (1 << 31)
}
 

Public Member Functions

 HWNDComponentPeer (Component &comp, const int windowStyleFlags, HWND parent, bool nonRepainting)
 
 ~HWNDComponentPeer ()
 
void * getNativeHandle () const override
 
void setVisible (bool shouldBeVisible) override
 
void setTitle (const String &title) override
 
void repaintNowIfTransparent ()
 
void updateBorderSize ()
 
void setBounds (const Rectangle< int > &bounds, bool isNowFullScreen) override
 
Rectangle< int > getBounds () const override
 
Point< int > getScreenPosition () const
 
Point< float > localToGlobal (Point< float > relativePosition) override
 
Point< float > globalToLocal (Point< float > screenPosition) override
 
void setAlpha (float newAlpha) override
 
void setMinimised (bool shouldBeMinimised) override
 
bool isMinimised () const override
 
void setFullScreen (bool shouldBeFullScreen) override
 
bool isFullScreen () const override
 
bool contains (Point< int > localPos, bool trueIfInAChildWindow) const override
 
BorderSize< int > getFrameSize () const override
 
bool setAlwaysOnTop (bool alwaysOnTop) override
 
void toFront (bool makeActive) override
 
void toBehind (ComponentPeer *other) override
 
bool isFocused () const override
 
void grabFocus () override
 
void textInputRequired (Point< int >, TextInputTarget &) override
 
void dismissPendingTextInput () override
 
void repaint (const Rectangle< int > &area) override
 
void performAnyPendingRepaintsNow () override
 
bool isInside (HWND h) const noexcept
 
- Public Member Functions inherited from ComponentPeer
 ComponentPeer (Component &component, int styleFlags)
 
virtual ~ComponentPeer ()
 
ComponentgetComponent () noexcept
 
int getStyleFlags () const noexcept
 
uint32 getUniqueID () const noexcept
 
virtual bool setDocumentEditedStatus (bool edited)
 
virtual void setRepresentedFile (const File &)
 
void updateBounds ()
 
Point< int > localToGlobal (Point< int > relativePosition)
 
Point< int > globalToLocal (Point< int > screenPosition)
 
virtual Rectangle< int > localToGlobal (const Rectangle< int > &relativePosition)
 
virtual Rectangle< int > globalToLocal (const Rectangle< int > &screenPosition)
 
Rectangle< int > getAreaCoveredBy (Component &subComponent) const
 
virtual bool isKioskMode () const
 
void setNonFullScreenBounds (const Rectangle< int > &newBounds) noexcept
 
const Rectangle< int > & getNonFullScreenBounds () const noexcept
 
void setConstrainer (ComponentBoundsConstrainer *newConstrainer) noexcept
 
ComponentBoundsConstrainergetConstrainer () const noexcept
 
void handleMovedOrResized ()
 
virtual void handleScreenSizeChange ()
 
void handlePaint (LowLevelGraphicsContext &contextToPaintTo)
 
void handleBroughtToFront ()
 
void handleFocusGain ()
 
void handleFocusLoss ()
 
ComponentgetLastFocusedSubcomponent () const noexcept
 
bool handleKeyPress (int keyCode, juce_wchar textCharacter)
 
bool handleKeyUpOrDown (bool isKeyDown)
 
void handleModifierKeysChange ()
 
TextInputTargetfindCurrentTextInputTarget ()
 
void handleMouseEvent (int touchIndex, Point< float > positionWithinPeer, ModifierKeys newMods, int64 time)
 
void handleMouseWheel (int touchIndex, Point< float > positionWithinPeer, int64 time, const MouseWheelDetails &)
 
void handleMagnifyGesture (int touchIndex, Point< float > positionWithinPeer, int64 time, float scaleFactor)
 
void handleUserClosingWindow ()
 
bool handleDragMove (const DragInfo &)
 
bool handleDragExit (const DragInfo &)
 
bool handleDragDrop (const DragInfo &)
 

Static Public Member Functions

static HWNDComponentPeergetOwnerOfWindow (HWND h) noexcept
 
static bool isKeyDown (const int key) noexcept
 
static void updateKeyModifiers () noexcept
 
static void updateModifiersFromWParam (const WPARAM wParam)
 
static LRESULT CALLBACK windowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ComponentPeer
static int getNumPeers () noexcept
 
static ComponentPeergetPeer (int index) noexcept
 
static ComponentPeergetPeerFor (const Component *) noexcept
 
static bool isValidPeer (const ComponentPeer *peer) noexcept
 

Public Attributes

bool dontRepaint
 

Static Public Attributes

static ModifierKeys currentModifiers
 
static ModifierKeys modifiersAtLastCallback
 

Additional Inherited Members

- Protected Attributes inherited from ComponentPeer
Componentcomponent
 
const int styleFlags
 
Rectangle< int > lastNonFullscreenBounds
 
ComponentBoundsConstrainerconstrainer
 

Member Enumeration Documentation

◆ RenderingEngineType

Enumerator
softwareRenderingEngine 
direct2DRenderingEngine 

Constructor & Destructor Documentation

◆ HWNDComponentPeer()

HWNDComponentPeer::HWNDComponentPeer ( Component comp,
const int  windowStyleFlags,
HWND  parent,
bool  nonRepainting 
)
inline

◆ ~HWNDComponentPeer()

HWNDComponentPeer::~HWNDComponentPeer ( )
inline

Member Function Documentation

◆ contains()

bool HWNDComponentPeer::contains ( Point< int >  localPos,
bool  trueIfInAChildWindow 
) const
inlineoverridevirtual

Checks if a point is in the window.

The position is relative to the top-left of this window, in unscaled peer coordinates. If trueIfInAChildWindow is false, then this returns false if the point is actually inside a child of this window.

Implements ComponentPeer.

◆ dismissPendingTextInput()

void HWNDComponentPeer::dismissPendingTextInput ( )
inlineoverridevirtual

If there's some kind of OS input-method in progress, this should dismiss it.

Reimplemented from ComponentPeer.

◆ getBounds()

Rectangle<int> HWNDComponentPeer::getBounds ( ) const
inlineoverridevirtual

Returns the current position and size of the window.

If the native window is contained in another window, then the coordinates are relative to the parent window's origin, not the screen origin.

Implements ComponentPeer.

◆ getFrameSize()

BorderSize<int> HWNDComponentPeer::getFrameSize ( ) const
inlineoverridevirtual

Returns the size of the window frame that's around this window. Whether or not the window has a normal window frame depends on the flags that were set when the window was created by Component::addToDesktop()

Implements ComponentPeer.

◆ getNativeHandle()

void* HWNDComponentPeer::getNativeHandle ( ) const
inlineoverridevirtual

Returns the raw handle to whatever kind of window is being used.

On windows, this is probably a HWND, on the mac, it's likely to be a WindowRef, but remember there's no guarantees what you'll get back.

Implements ComponentPeer.

◆ getOwnerOfWindow()

static HWNDComponentPeer* HWNDComponentPeer::getOwnerOfWindow ( HWND  h)
inlinestaticnoexcept

◆ getScreenPosition()

Point<int> HWNDComponentPeer::getScreenPosition ( ) const
inline

◆ globalToLocal()

Point<float> HWNDComponentPeer::globalToLocal ( Point< float >  screenPosition)
inlineoverridevirtual

Converts a screen coordinate to a position relative to the top-left of this component.

Implements ComponentPeer.

◆ grabFocus()

void HWNDComponentPeer::grabFocus ( )
inlineoverridevirtual

Tries to give the window keyboard focus.

Implements ComponentPeer.

◆ isFocused()

bool HWNDComponentPeer::isFocused ( ) const
inlineoverridevirtual

True if the window has the keyboard focus.

Implements ComponentPeer.

◆ isFullScreen()

bool HWNDComponentPeer::isFullScreen ( ) const
inlineoverridevirtual

True if the window is currently full-screen.

Implements ComponentPeer.

◆ isInside()

bool HWNDComponentPeer::isInside ( HWND  h) const
inlinenoexcept

◆ isKeyDown()

static bool HWNDComponentPeer::isKeyDown ( const int  key)
inlinestaticnoexcept

◆ isMinimised()

bool HWNDComponentPeer::isMinimised ( ) const
inlineoverridevirtual

True if the window is currently minimised.

Implements ComponentPeer.

◆ localToGlobal()

Point<float> HWNDComponentPeer::localToGlobal ( Point< float >  relativePosition)
inlineoverridevirtual

Converts a position relative to the top-left of this component to screen coordinates.

Implements ComponentPeer.

◆ performAnyPendingRepaintsNow()

void HWNDComponentPeer::performAnyPendingRepaintsNow ( )
inlineoverridevirtual

This can be called (from the message thread) to cause the immediate redrawing of any areas of this window that need repainting.

You shouldn't ever really need to use this, it's mainly for special purposes like supporting audio plugins where the host's event loop is out of our control.

Implements ComponentPeer.

◆ repaint()

void HWNDComponentPeer::repaint ( const Rectangle< int > &  area)
inlineoverridevirtual

Invalidates a region of the window to be repainted asynchronously.

Implements ComponentPeer.

◆ repaintNowIfTransparent()

void HWNDComponentPeer::repaintNowIfTransparent ( )
inline

◆ setAlpha()

void HWNDComponentPeer::setAlpha ( float  newAlpha)
inlineoverridevirtual

Changes the window's transparency.

Implements ComponentPeer.

◆ setAlwaysOnTop()

bool HWNDComponentPeer::setAlwaysOnTop ( bool  alwaysOnTop)
inlineoverridevirtual

Sets this window to either be always-on-top or normal. Some kinds of window might not be able to do this, so should return false.

Implements ComponentPeer.

◆ setBounds()

void HWNDComponentPeer::setBounds ( const Rectangle< int > &  newBounds,
bool  isNowFullScreen 
)
inlineoverridevirtual

Moves and resizes the window.

If the native window is contained in another window, then the coordinates are relative to the parent window's origin, not the screen origin.

This should result in a callback to handleMovedOrResized().

Implements ComponentPeer.

◆ setFullScreen()

void HWNDComponentPeer::setFullScreen ( bool  shouldBeFullScreen)
inlineoverridevirtual

Enable/disable fullscreen mode for the window.

Implements ComponentPeer.

◆ setMinimised()

void HWNDComponentPeer::setMinimised ( bool  shouldBeMinimised)
inlineoverridevirtual

Minimises the window.

Implements ComponentPeer.

◆ setTitle()

void HWNDComponentPeer::setTitle ( const String title)
inlineoverridevirtual

Changes the title of the window.

Implements ComponentPeer.

◆ setVisible()

void HWNDComponentPeer::setVisible ( bool  shouldBeVisible)
inlineoverridevirtual

Shows or hides the window.

Implements ComponentPeer.

◆ textInputRequired()

void HWNDComponentPeer::textInputRequired ( Point< int >  position,
TextInputTarget  
)
inlineoverridevirtual

Tells the window that text input may be required at the given position. This may cause things like a virtual on-screen keyboard to appear, depending on the OS.

Implements ComponentPeer.

◆ toBehind()

void HWNDComponentPeer::toBehind ( ComponentPeer other)
inlineoverridevirtual

Moves the window to be just behind another one.

Implements ComponentPeer.

◆ toFront()

void HWNDComponentPeer::toFront ( bool  makeActive)
inlineoverridevirtual

Brings the window to the top, optionally also giving it focus.

Implements ComponentPeer.

◆ updateBorderSize()

void HWNDComponentPeer::updateBorderSize ( )
inline

◆ updateKeyModifiers()

static void HWNDComponentPeer::updateKeyModifiers ( )
inlinestaticnoexcept

◆ updateModifiersFromWParam()

static void HWNDComponentPeer::updateModifiersFromWParam ( const WPARAM  wParam)
inlinestatic

◆ windowProc()

static LRESULT CALLBACK HWNDComponentPeer::windowProc ( HWND  h,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
inlinestatic

Member Data Documentation

◆ currentModifiers

ModifierKeys HWNDComponentPeer::currentModifiers
static

◆ dontRepaint

bool HWNDComponentPeer::dontRepaint

◆ modifiersAtLastCallback

ModifierKeys HWNDComponentPeer::modifiersAtLastCallback
static

The documentation for this class was generated from the following file: