📄 oxvideosetting.pas
字号:
unit oxVideoSetting;
(*==============================================================================
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is "oxNewton opengl-Dynamics-delphi-component".
The Initial Developer of the Original Code is
Dave Gravel, OrionX3D Opengl & Delphi Programming, dave.gravel@cgocable.ca.
http://www.Dave.ServeUsers.com
http://www.k00m.sexidude.com
Portions created by Dave Gravel are Copyright (C) 2004 - 2006.
Dave Gravel. All Rights Reserved.
Contributor(s): GLScene (http://www.glscene.org) -
Julio Jerez and Alain Suero (http://www.newtondynamics.com) -
Sascha Willems (www.delphigl.de)
================================================================================
oxNewton v1.47 by Dave Gravel.
PS: I request only one thing from the users of my oxNewton Component,
it is to put on your about or your help a comment saying you using the
oxNewton Component with my name Dave Gravel and my
e-mail: dave.gravel@cgocable.ca
Don't modify or remove any comment or information on my file
if you do some modification on my code please contact me.
Read the Newton license too, it is realy important.
===============================================================================*)
interface
uses Forms, SysUtils, Messages, Graphics, Controls, classes, Dialogs, windows,
StdCtrls,
//
GLWin32Viewer, GLScene, GLObjects, VectorGeometry, GLTexture, GLMisc,
GLScreen, GLCadencer, oxVS;
{******************************************************************************}
// [10-04-2006]: TOXVideoSetting last change by Dave Gravel.
{******************************************************************************}
type
TOXVideoSetting = class( TComponent )
private
FMainForm: TForm;
FViewer: TGLSceneViewer;
FCadencer: TGLCadencer;
protected
//
public
procedure ExecuteFormSetting;
constructor Create(aOwner: TComponent); override;
destructor Destroy; override;
published
property Viewer: TGLSceneViewer read FViewer write FViewer;
property Cadencer: TGLCadencer read FCadencer write FCadencer;
end;
implementation
{******************************************************************************}
// [10-04-2006]: TOXVideoSetting last change by Dave Gravel.
{******************************************************************************}
constructor TOXVideoSetting.Create(aOwner: TComponent);
begin
inherited Create(aOwner);
ReadVideoModes;
FMainForm:= TForm( aOwner );
FMainForm.Width:= 0;
FMainForm.Height:= 0;
FMainForm.WindowState:= wsMinimized;
FMainForm.Caption:= 'oxNewton 1.46 by Dave Gravel - 2006.';
Application.Title:= 'oxNewton 1.46 by Dave Gravel - 2006.';
oxVideoFrm:= ToxVideoFrm.Create( aOwner );
end;
{******************************************************************************}
// [10-04-2006]: TOXVideoSetting last change by Dave Gravel.
{******************************************************************************}
procedure TOXVideoSetting.ExecuteFormSetting;
var
i: Integer;
DevMode: TDeviceMode;
begin
i:=0;
{$IFOPT R+}
{$DEFINE CKRANGE}
{$R-} //range-checking of
{$ENDIF}
while EnumDisplaySettings( nil, i, DevMode ) do begin
with Devmode do
oxVideoFrm.ListBox1.Items.Add(Format( '%d x %d %d bits %dhtz',
[ dmPelsWidth, dmPelsHeight, dmBitsPerPel, dmDisplayFrequency ] ) );
Inc(i);
end;
{$IFDEF CKRANGE}
{$UNDEF CKRANGE}
{$R+} //range-checking on
{$ENDIF}
oxVideoFrm.oxVirtualMainFrm:= FMainForm;
oxVideoFrm.oxVirtualViewer:= FViewer;
oxVideoFrm.oxVirtualCadencer:= FCadencer;
oxVideoFrm.Show;
end;
{******************************************************************************}
// [10-04-2006]: TOXVideoSetting last change by Dave Gravel.
{******************************************************************************}
destructor TOXVideoSetting.Destroy;
begin
FMainForm:= nil;
FViewer:= nil;
RestoreDefaultMode;
inherited Destroy;
end;
{******************************************************************************}
{$D '[10-04-2006]: TOXNewtonManager v1.47 by Dave Gravel under MPL-1.1 license.'}
{******************************************************************************}
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -