Window title bar creating method and device
A title bar, form technology, applied in the direction of program control device, etc., can solve the problem that the form cannot satisfy the title bar and display of the custom form at the same time.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0020] figure 1 The implementation flow of the method for creating a window title bar provided by Embodiment 1 of the present invention is shown, and the process of the method is described in detail as follows:
[0021] In step S101, add a custom view in the top view of the form;
[0022] Specifically, obtain the parent view (superView) object ViewP of the user area view (contentView), construct a view type in the Apple operating system, such as the NSView type, and construct the derived class object ViewS of the NSView type, and convert the derived class object ViewS As a subview of the parent view object ViewP, set ViewS as the bottom view of ViewP by calling the add subview interface in ViewP (setting the parameter of the addSubview:positioned:relativeTo: method positioned in the subview interface to NSWindowBelow). It should be noted that the superView of the contentView is the top-level view of the form, and the subview is a custom view.
[0023] In this embodiment, the...
Embodiment 2
[0028] Figure 4 It shows the implementation flow of the method for creating a window title bar provided by Embodiment 2 of the present invention. This embodiment adds step S403 on the basis of Embodiment 1:
[0029] In step S403, the window title bar background is drawn according to the state of the current window.
[0030] Specifically, construct a window type in the Apple operating system, such as NSWindow type, through the notification function of the NSWindow type (NSWindowDidBecomeMainNotification, triggered when the window becomes active) and NSWindowDidResignMainNotification, when the window becomes inactive Trigger event) to monitor the trigger operation of the current form state change. When the current form state is detected to be changed, the gradient color corresponding to the current form state is extracted from the pre-stored gradient color, and the NSGradient is generated according to the extracted gradient color ( The type in the Apple operating system, used ...
Embodiment 3
[0034] Figure 5 The composition structure of the device for creating a window title bar provided by the third embodiment of the present invention is shown, and for the convenience of description, only the parts related to the embodiment of the present invention are shown.
[0035] The window title bar creation device may be a software unit, a hardware unit or a combination of software and hardware running in each application system, or it may be integrated into each application system as an independent pendant.
[0036] The device for creating a window title bar includes a view adding unit 51 and a view covering unit 52 . Among them, the specific functions of each unit are as follows:
[0037] The view adding unit 51 is used to add a custom view in the top-level view of the form; specifically, it is used to obtain the parent view object of the user area view, and construct an NSView type derived class object, and use the derived class object as the parent view The subview o...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com