{*********************************************}
{ TeeChart Pro for FireMonkey                 }
{ Copyright (c) 2011-2020 by Steema Software  }
{                                             }
{ Component Registration Unit                 }
{                                             }
{ Functions:                                  }
{          TCountTeeFunction                  }
{          TCurveFittingTeeFunction           }
{          TAverageTeeFunction                }
{          TMovingAverageTeeFunction          }
{          TExpMovAveFunction                 }
{          TExpAverageTeeFunction             }
{          TSmoothedMovAvgunction             }
{          TMomentumTeeFunction               }
{          TRSITeeFunction                    }
{          TStdDeviationTeeFunction           }
{          TMACDFunction                      }
{          TMoneyFlowFunction                 }
{          TRootMeanSquareFunction            }
{          TCumulative                        }
{          TCompressFunction                  }
{          TCrossPointsFunction               }
{          TSmoothPointsFunction              }
{          TCLVFunction                       }
{          TOBVFunction                       }
{          TPVOFunction                       }
{          TSARFunction                       }
{          TSkewnessFunction                  }
{          TKurtosisFunction                  }
{          TATRFunction                       }
{          TRVIFunction                       }
{          TAOFunction                        }
{          TACFunction                        }
{          TAlligatorFunction                 }
{          TGatorFunction                     }
{          TPercentChangeFunction             }
{          TSlopeFunction                     }
{                                             }
{ Series:                                     }
{          TCandleSeries                      }
{          TVolumeSeries                      }
{          TSurfaceSeries                     }
{          TContourSeries                     }
{          TWaterFallSeries                   }
{          TErrorBarSeries                    }
{          TPolarSeries                       }
{          TBezierSeries                      }
{          TPoint3DSeries                     }
{          TDonutSeries                       }
{          TBoxPlotSeries                     }
{          THistogramSeries                   }
{          TSmithSeries                       }
{          TPyramidSeries                     }
{          TMapSeries                         }
{          TPointFigureSeries                 }
{          TGaugeSeries                       }
{          TTowerSeries                       }
{          TVector3DSeries                    }
{          TVolumePipeSeries                  }
{          THighLowLineSeries                 }
{          TWorldSeries (GIS / Mapping)       }
{          TOrgSeries (Organization Charts)   }
{          TTagCloudSeries (Cloud of tags)    }
{          TNumericGauge (LED / LCD gauge)    }
{          TLinearGauge                       }
{          TCircularGauge                     }
{          TTernarySeries                     }
{          TKnobGauge                         }
{          TTreeMapSeries (Treemaps)          }
{                                             }
{ Tools:                                      }
{          TCursorTool                        }
{          TDragMarksTool                     }
{          TDrawLineTool                      }
{          THintsTool                         }
{          TRotateTool                        }
{          TAxisArrowTool                     }
{          TColorLineTool                     }
{          TColorBandTool                     }
{          TImageTool                         }
{          TPageNumTool                       }
{          TDragPointTool                     }
{          TExtraLegendTool                   }
{          TSeriesAnimationTool               }
{          TGanttTool                         }
{          TGridBandTool                      }
{          TPieTool                           }
{          TLightTool                         }
{          TLegendScrollBar                   }
{          TSurfaceNearestTool                }
{          TSelectorTool                      }
{          TClipSeriesTool                    }
{          TSeriesBandTool                    }
{          TDataTableTool                     }
{          TSeriesStatsTool                   }
{          TVideoTool                         }
{          TVideoPlayerTool                   }
{          TAntiAliasTool                     }
{          TBannerTool                        }
{          TMagnifyTool                       }
{          TLegendPaletteTool                 }
{          TText3DTool                        }
{          TSubChartTool                      }
{          TLinkTool                          }
{          TFibonacciTool                     }
{          TScrollPagerTool                   }
{          TClusteringTool                    }
{                                             }
{ Other:                                      }
{          TTeeCommander                      }
{          TChartEditor                       }
{          TChartPreviewer                    }
{          TChartScrollBar                    }
{          TChartListBox                      }
{          TSeriesDataSet*                    }
{          TChartGalleryPanel                 }
{          TTeePreviewPanel                   }
{          TChartGrid                         }
{          TChartGridNavigator                }
{          TChartPageNavigator                }
{          TChartWebSource                    }
{          TSeriesTextSource                  }
{          TTeeInspector                      }
{          TTeeXMLSource                      }
{          TTeeExcelSource                    }
{          TImageFiltered                     }
{          TChartBook                         }
{          TImportChart                       }
{          TDashBoard                         }
{          TDataImport                        }
{          TChartLayout                       }
{                                             }
{          Alternate Gallery                  }
{                                             }
{ Sample Series:                              }
{          TMyPointSeries                     }
{          TBar3DSeries                       }
{          TBigCandleSeries                   }
{          TImagePointSeries                  }
{          TDeltaPoint                        }
{          TImageBarSeries                    }
{          TWindRoseSeries                    }
{          TClockSeries                       }
{          TBarJoinSeries                     }
{          TCalendarSeries                    }
{                                             }
{ * TSeriesDataSet not available in           }
{   STANDARD versions of Delphi/CBuilder      }
{                                             }
{*********************************************}
unit FMXTeeChartPro;
{$I TeeDefs.inc}

interface

{$IFNDEF IOS}
procedure Register;
{$ENDIF}

implementation

uses
  System.Classes, System.SysUtils,
  FMX.Types, FMX.Dialogs, FMX.Platform, System.UITypes,

  FMXTee.About, FMXTee.Editor.Chart3D,
  FMXTee.Editor.Pro, FMXTee.Languages, FMXTee.Editor.Languages,

  FMXTee.Editor.Stroke,
   //TeeNavigator,
   FMXTee.Engine, FMXTee.Chart, FMXTee.Procs,
   FMXTee.Constants, FMXTee.ProConstants,
   FMXTee.Canvas,
   //TeeScroB,
   FMXTee.Editor.Chart,
   FMXTee.Commander,
   //TeeInspector,
   FMXTee.Tools,

   FMXTee.Editor.Tools,
   FMXTee.Tools.Gallery,
   FMXTee.Chart.GalleryPanel,
   FMXTee.Print.Preview,
   FMXTee.Print.PreviewPanel,
   FMXTee.Chart.Grid,
   FMXTee.Chart.ListBox,
   FMXTee.Editor.EditorPanel,

   //MyPoint,
   //BigCandl,

   FMXTee.Series.ImagePoint,

   // ImageBar, TeeImaEd,

   FMXTee.URL,

   //TeeSeriesTextEd,
   //TeeChartActions,
   //TeeCalendar,
   //TeeSeriesAnimEdit,
   //TeeAnimations,

   //FMXTee.XML,

   //FMXTee.Canvas.VRML3D,

   //TeeGridBandToolEdit, TeeGaugeEditor, TeeTowerEdit,
   //TeeLighting,
   //TeeDataTableEditor,

   //TeeDesignOptions,
   //TeeEditCha,

   {$IFNDEF LCL}
   //TeeExcelSource,
   {$ENDIF}

   {$IFNDEF LCL}
   //TeeVideo,
   //TeeVideoPlayer,
   {$ENDIF}


   //TeeChartBook,
   //TeeDashBoard,
   //EditChar,
   //FMXTee.Tools.Magnify,
   //, FMXTee.Animations.GalleryDemos  // <-- tools+animations demos only at design-time package

   {$IFNDEF IOS}
   DesignIntf, DesignEditors, PropertyCategories,
   {$ENDIF}

   FMXTee.Canvas.SVG,
   FMXTee.Canvas.XAML,
   //FMXTee.Canvas.Flex,
   FMXTee.Canvas.HTML5,
   FMXTee.Canvas.PDF,
   FMXTee.Canvas.VML,
   FMXTee.Canvas.PostScript,
   FMXTee.Canvas.JavaScript,
   FMXTee.Editor.Export.JavaScript,
   FMXTee.Import,
   FMXTee.Editor.Import,
   FMXTee.ChartLayout;


{$IFNDEF IOS}
type
  TImportChartEditor=class(TComponentEditor)
  public
    procedure ExecuteVerb(Index:Integer); override;
    function GetVerb(Index:Integer):string; override;
    function GetVerbCount:Integer; override;
  end;

{ TImportChartEditor }
procedure TImportChartEditor.ExecuteVerb(Index:Integer);
var tmpDialog : TOpenDialog;
begin
  if Index=0 then
  begin
    tmpDialog:=TOpenDialog.Create(nil);
    try
      tmpDialog.Filter:=TeeMsg_TeeFiles+' (*.'+TeeMsg_TeeExtension+')'; // Do not localize

      tmpDialog.Filter:=tmpDialog.Filter+'|*.'+TeeMsg_TeeExtension; // Do not localize

      if tmpDialog.Execute then
      begin
        TeeChangeCursor(nil, crHourGlass);
        try
          TImportChart(Component).LoadFromFile(tmpDialog.FileName);
        finally
          TeeChangeCursor(nil, crDefault);
        end;
      end;
    finally
      tmpDialog.Free;
    end;
  end
  else inherited;
end;

function TImportChartEditor.GetVerbCount:Integer;
begin
  Result:=inherited GetVerbCount+1;
end;

function TImportChartEditor.GetVerb(Index:Integer):string;
begin
  if Index=0 then result:=TeeMsg_Load
             else result:=inherited GetVerb(Index);
end;

procedure Register;
begin
  {$IFDEF D9}
 // ForceDemandLoadState(dlEnable);
  {$ENDIF}

  {$IFDEF D6}
  TeeActivateGroup;

  GroupDescendentsWith(TCustomChartEditor,TFmxObject);
  GroupDescendentsWith(TCustomChartLink,TFmxObject);
  {$ENDIF}

  { Pro Components }
  RegisterComponents(TeeMsg_TeeChartPalette, [ TChartEditor,
                                               TChartPreviewer,

                                               //TChartScrollBar,

                                               TTeeCommander,
                                               TChartListBox,
                                               TChartEditorPanel,
                                               TChartGalleryPanel,
                                               TTeePreviewPanel,
                                               TChartGrid,

                                               //TChartGridNavigator,
                                               //TChartPageNavigator,

                                               TChartWebSource,

                                               //TTeeInspector,
                                               //TTeeXMLSource,
                                               //TTeeExcelSource,
                                               //TSeriesTextSource,
                                               //TChartBook,
                                               //TDashBoard,

                                               TImportChart,
                                               TDataImport,
                                               TChartLayout
                                             ]);

  RegisterComponentEditor(TImportChart, TImportChartEditor);

  TeeSetLanguage(False);
end;
{$ENDIF}

end.
