SliceO_Class::Inside_Pt

 

This method return "0" if the point "pt" is not inside the class's bounding box.

 

 

Syntax

 

int  Inside_Pt(

          SliceO_Window * window,

          Point_2D pt

) ;

 

 

Parameters

 

window

                    Pointer to a window .

 

pt

                    2D point (in "Inf" space) to compare with the bounding box.

 

 

Return value

 

This method return "0" if the point "pt" is not inside the class's bounding box.

 

 

Remarks

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

Library:

          sliceO_Structures.lib

 

 

Example

 

// --- get the current window ---

SliceO_Window *window = (SliceO_Window *) Fct_Variable_Value( "$WINDOW_CUR" ) ;

// --- get the current mouse posiiton (in infinite space) ---

Point_2D *mouse = (Point_2D *) Fct_Variable_Get( "$MOUSE_INF" ) ;

 

if ( Iterator_Init( ITERATOR_USER_1, "Test" ) ) {

          while( SliceO_Frame *frame = (SliceO_Frame *) Iterator_Class( ITERATOR_USER_1, CLASS_ID_FRAME, window ) ) {

 

                    // --- is the cursor inside this frame ? ---

                    if ( frame->Inside_Pt( window, *mouse ) ) {

                              Error_Fct( hwnd, ERROR_CODE_REPORT, "Inisde frame %s", frame->Name_get() ) ;

                              break ;

                    }

          }

          Iterator_End( ITERATOR_USER_1 ) ;

}

 

See also