From fdf1a7c15ad12b76299637e475af7fd66c4932fd Mon Sep 17 00:00:00 2001 From: kpl Date: Mon, 26 Nov 2012 23:02:02 -0800 Subject: [PATCH] cmGrPlot.h/c Added cmGrPlotObjParent/XAnchor/YAnchor(). --- cmGrPlot.c | 27 +++++++++++++++++++++++++++ cmGrPlot.h | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/cmGrPlot.c b/cmGrPlot.c index c66b130..40e914b 100644 --- a/cmGrPlot.c +++ b/cmGrPlot.c @@ -847,6 +847,33 @@ cmGrObjH_t cmGrPlotObjHandle( cmGrPlObjH_t oh ) return op->grObjH; } +cmGrPlObjH_t cmGrPlotObjParent( cmGrPlObjH_t oh ) +{ + cmGrPlObjH_t p_oh; + cmGrPlotObj_t* op = _cmGrPlObjHandleToPtr(oh); + + p_oh.h = op->parent; + return p_oh; +} + +cmGrPlObjH_t cmGrPlotObjXAnchor( cmGrPlObjH_t oh ) +{ + cmGrPlObjH_t p_oh; + cmGrPlotObj_t* op = _cmGrPlObjHandleToPtr(oh); + + p_oh.h = op->xAnchor; + return p_oh; +} + +cmGrPlObjH_t cmGrPlotObjYAnchor( cmGrPlObjH_t oh ) +{ + cmGrPlObjH_t p_oh; + cmGrPlotObj_t* op = _cmGrPlObjHandleToPtr(oh); + + p_oh.h = op->yAnchor; + return p_oh; +} + void cmGrPlotObjSetId( cmGrPlObjH_t oh, unsigned id ) { diff --git a/cmGrPlot.h b/cmGrPlot.h index a92ebb5..bb61a19 100644 --- a/cmGrPlot.h +++ b/cmGrPlot.h @@ -140,6 +140,10 @@ extern "C" { cmGrPlH_t cmGrPlotObjMgrHandle( cmGrPlObjH_t oh ); cmGrObjH_t cmGrPlotObjHandle( cmGrPlObjH_t oh ); + cmGrPlObjH_t cmGrPlotObjParent( cmGrPlObjH_t oh ); + cmGrPlObjH_t cmGrPlotObjXAnchor( cmGrPlObjH_t oh ); + cmGrPlObjH_t cmGrPlotObjYAnchor( cmGrPlObjH_t oh ); + void cmGrPlotObjSetId( cmGrPlObjH_t oh, unsigned id ); unsigned cmGrPlotObjId( cmGrPlObjH_t oh );