c语言有没有函数重写 c语言有没有函数重写功能( 二 )


CvWindow(cv::String name, int flag = CV_WINDOW_NORMAL);
~CvWindow();
/** @brief NOTE: prototype.
Should create button if there is no button with this name already.
*/
void createButton(cv::String name);
/** @brief Creates slider if there is no slider with this name already.
The function creates slider if there is no slider with this name already OR resets
provided values for the existing one.
*/
void createSlider(cv::String name, int* val, int count, CvTrackbarCallback2 on_notify, void* userdata);
/** @brief Updates window image.
@param src Image data object reference.
The function updates window image. If argument is null or image control is not found - does nothing.
*/
void updateImage(CvMat* arr);
/** @brief Returns reference to the trackbar(slider) registered within provided window.
@param name Name of the window.
The function returns reference to the trackbar(slider) registered within provided window.
Returns nullptr if trackbar with specified name is not found or window reference is nullptr.
*/
CvTrackbar*findTrackbarByName(cv::String name);
Page^getPage();
private:
cv::String name;
// Holds image data in CV format
CvMat* imageData;
// Map of all sliders assigned to this window
std::mapcv::String, CvTrackbar**sliderMap;
// Window contents holder
Page^ page;
// Image control displayed by this window
Image^ imageControl;
// Container for sliders
Panel^ sliderPanel;
// Container for buttons
// TODO: prototype, not available via API
Panel^ buttonPanel;
// Holds image width to arrange other UI elements.
// Required since imageData-width value gets recalculated when processing
int imageWidth;
// Default markup for the container content allowing for proper components placement
static const Platform::String^ markupContent;
【c语言有没有函数重写 c语言有没有函数重写功能】// Default Slider size, fallback solution for unexpected edge cases
static const double sliderDefaultWidth;
};
//CvWindwo构造函数为
CvWindow::CvWindow(cv::String name, int flags) : name(name){
this-page = (Page^)Windows::UI::Xaml::Markup::XamlReader::Load(const_castPlatform::String^(markupContent));
this-sliderMap = new std::mapcv::String, CvTrackbar*();
sliderPanel = (Panel^)page-FindName("cvTrackbar");
imageControl = (Image^)page-FindName("cvImage");
buttonPanel = (Panel^)page-FindName("cvButton");
// Required to adapt controls to the size of the image.
// System calculates image control width first, after that we can
// update other controls
imageControl-Loaded += ref new Windows::UI::Xaml::RoutedEventHandler(
[=](Platform::Object^ sender,
Windows::UI::Xaml::RoutedEventArgs^ e){
// Need to update sliders with appropriate width
for(auto iter=sliderMap-begin();iter!=sliderMap-end();++iter){
iter-second-getSlider()-Width = imageControl-ActualWidth;
}
// Need to update buttons with appropriate width
// TODO: implement when adding buttons
});
}
关于c语言有没有函数重写和c语言有没有函数重写功能的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息 , 记得收藏关注本站 。

推荐阅读